GPTLEGAL
GPTLEGAL
gptlegal.com.do
×
CustomGPT
CustomGPT
customgpt.ai

We built the Dominican Republic's
First Native Legal AI Platform

154,420 legal documents. 701,449 knowledge graph edges. GraphRAG. Full SaaS with local payments. Production on Google Cloud. Built by a litigation attorney — starting from a CustomGPT prototype.

154K
Legal documents indexed
701K
Knowledge graph edges
1,001
Legal dictionary entries
340
Judges indexed
The Origin

CustomGPT was the laboratory

The Dominican Republic has one of the most fragmented legal knowledge systems in the Caribbean. Supreme Court rulings, constitutional decisions, labor tribunal precedents, appeals court records — all scattered across PDFs, portals and physical archives, with no semantic search and no structure.

Before writing a single line of infrastructure code, we validated the entire product using CustomGPT. We ingested the first 50,000 documents, deployed the agent to real lawyers, and let their query patterns tell us exactly what to build.

Every retrieval failure, every "almost right" answer, every power-user workflow — that became the product specification for gptlegal.com.do.

Speed to validation
CustomGPT let us skip more than a full year of infrastructure build. We learned what mattered before writing a single line of our own code.
🔬
Real lawyer feedback
Attorneys using the CustomGPT prototype taught us: query by case facts, not by statute. That changed the entire retrieval model.
📐
Data prioritization signal
Query patterns revealed which document types mattered most. That shaped our BigQuery schema, embedding strategy and source ingestion order.
🚀
The premium use case revealed
Users asked for full document generation, not just answers. CustomGPT revealed the feature that now drives our paid plans.
Under the Hood

Production Infrastructure — Every Layer

What CustomGPT validated became a full-stack, production-grade platform. Here's the complete architecture.

GPTLEGAL — Production Architecture (April 2026)
┌──────────────────────────────────────────────────────────────────┐
│  USER  ·  Astro 5 SSR  ·  React components  ·  Tailwind CSS     │
└─────────────────────────┬────────────────────────────────────────┘
                          │  HTTPS / SSE streaming
┌─────────────────────────▼────────────────────────────────────────┐
│  GOOGLE CLOUD RUN  —  gptlegal-00055-9sx                        │
│  Node.js 20  ·  Astro SSR adapter  ·  Auto-scaling 0 → N       │
│  CI/CD: GitHub Actions → Workload Identity Federation → GCR     │
└────────┬────────────────────────────┬────────────────────────────┘
         │                            │
┌────────▼────────────┐   ┌──────────▼──────────────────────────┐
│  CLOUD SQL          │   │  BIGQUERY  (154,420 documents)       │
│  PostgreSQL 15      │   │  gptlegal.gptlegal_cerebro           │
│  Unix socket /      │   │  ├── VECTOR_SEARCH  (Gemini embeds)  │
│  cloudsql/…         │   │  ├── BM25 SEARCH()  (fulltext)       │
│  ┌──────────────┐   │   │  ├── LIKE exact refs (Art./Ley)      │
│  │ users        │   │   │  └── HYBRID RRF reranking            │
│  │ conversations│   │   │  Sources: SCJ · TC · TSA · CA        │
│  │ wallet_txns  │   │   └──────────────────────────────────────┘
│  │ error_events │   │
│  │ azul_payments│   │   ┌──────────────────────────────────────┐
│  │ documents    │   │   │  NEO4J  (VM 849 · GCP)               │
│  └──────────────┘   │   │  v2025.04.0  ·  GraphRAG in prod     │
└─────────────────────┘   │  167,776 nodes  ·  701,449 edges     │
                          │  34 subject areas · 340 judges       │
┌─────────────────────┐   │  Cypher queries · 800ms timeout      │
│  GEMINI 2.0 FLASH   │   └──────────────────────────────────────┘
│  Streaming SSE      │
│  Web grounding      │   ┌──────────────────────────────────────┐
│  5 legal personas   │   │  GCS BACKUP  gs://gptlegal-cerebro/  │
└─────────────────────┘   │  Daily 3AM · 3.4 GB · 5-day retain  │
                          └──────────────────────────────────────┘
┌─────────────────────┐
│  AZUL PAYMENTS      │   Auth: Google OAuth + Magic Link
│  Dominican card     │   Sessions: JWT in secure cookies
│  processor  ·  Link │   Monitoring: error_events table (new)
│  de Pagos + Virtual │   Embeddings: text-embedding-004
└─────────────────────┘
      
🔍
Hybrid Retrieval Engine

Four strategies run in parallel on every query, merged via Reciprocal Rank Fusion:

Vector Search Gemini text-embedding-004 · cosine ANN on 154K docs
BM25 Fulltext BigQuery SEARCH() · handles Spanish legal terminology natively
Exact References LIKE matching for "Art. 416", "Ley 87-01", case numbers
GraphRAG Neo4j Cypher · follows norma citations to related rulings
🧠
Neo4j Knowledge Graph

Every law, ruling, judge and doctrine in the DR legal system — interconnected:

167,776 nodes Documents, laws, judges, courts, subject areas, doctrines
701,449 edges Citation links, normative references, doctrine connections
340 judges indexed Ponente analysis — behavioral pattern detection per judge
Real-time Cypher 800ms timeout · async fallback · in production since April 2026
☁️
Platform Stack
Frontend Astro 5 SSR · React islands · TypeScript · Tailwind CSS
Runtime Google Cloud Run · Node.js 20 · auto-scaling · zero downtime
AI Gemini 2.0 Flash · streaming SSE · web grounding · 5 personas
CI/CD GitHub Actions → WIF → Cloud Run · every push auto-deploys
Auth Google OAuth + magic link · JWT in secure cookies
Payments AZUL — Dominican Republic's leading card processor
💼
Product Features (Live)
AI Legal Agent 5 expert personas · RAG-grounded · streaming responses
Document Generator Contracts, briefs, motions · DOCX export with legal branding
Token Economy Wallet credits + plan quotas + legacy client system
Subscription Plans Free / Estudiante / Profesional / Institucional · paid via AZUL
Legal Dictionary 1,001 entries — first AI-assisted legal dictionary in the DR
Admin Mission Control Real-time KPIs · error observability · user management
The Corpus

154,420 Documents — Every Source of Law in the DR

Four judicial sources. Fully scraped, cleaned, embedded and indexed. This is the foundation that CustomGPT helped us decide was worth building.

SCJ
Suprema Corte de Justicia

Supreme Court — civil, criminal and cassation rulings from 2013 to 2024. Full API ingestion.

21,863+ docs
TC
Tribunal Constitucional

All TC decisions on fundamental rights and constitutional review. Complete corpus.

Full corpus
TSA
Tribunal Superior Administrativo

Administrative and special jurisdiction courts — key source for administrative law and regulatory disputes.

Full corpus
CA
Cortes de Apelación

33,784 appellate decisions from JurisTecA — civil, criminal, family and specialized courts.

33,784 docs
BigQuery — 4 search strategies, 1 unified result per query
VECTOR_SEARCH
ANN cosine similarity on Gemini text-embedding-004 vectors
BM25 SEARCH()
Fulltext matching tuned for Spanish legal terminology
LIKE exact refs
Pattern match for Art. N, Ley NNN-NN, docket numbers
HYBRID RRF
Reciprocal Rank Fusion merges all strategies into one ranked list
"
CustomGPT didn't just let us test an idea. It taught us exactly what a Dominican lawyer needs from AI — and that curriculum became the architecture of everything we built.
G
Gilberto Objío Subero
Founder, GPTLEGAL · Litigation Attorney · PhD(c) Applied AI
What's Next

Roadmap 2026 – 2028

The Dominican Republic is proof of concept. The Caribbean is the market.

2026 — ROOTS
  • Active subscriptions + AZUL payment processing
  • Legal Dictionary published with ISBN
  • Public API for law firms and legal tech
  • Government sector partnerships
  • Cassation outcome prediction model
2027 — WINGS
  • Expansion: Haiti + Puerto Rico
  • White-label for law firms and bar associations
  • University of Law integrations (UASD, UNPHU, PUCMM)
  • Medical-legal AI vertical (PalliaRD)
  • Judge behavior prediction per court chamber
2028 — AUTHORITY
  • Full Spanish-speaking Caribbean coverage
  • Poder Judicial institutional partnership
  • Applied AI Legal Research Lab
  • PhD research publication — AI × Legal Productivity
  • Series A or strategic acquisition
Live in Production

See it working — right now

Every feature on this page is live at gptlegal.com.do. No sandbox. No demo environment. This is production.

Built by Gilberto Objío Subero · Santo Domingo, Dominican Republic · objio@objiolegal.com