Consolidating systems into AlloyDB
Rather than deploying separate relational databases, vector databases, and log stores, Lucius AI houses all core data in AlloyDB for PostgreSQL. The relational tender catalog, document metadata, audit logs, and vector embeddings reside in the same database engine. Storing vector embeddings alongside relational rows avoids managing separate vector stores, establishes a unified backup schedule, and centralizes identity management.
Authentication relies strictly on Cloud IAM. Services connect using dedicated Google Cloud service accounts mapped to database roles scoped to specific access requirements, without storing database passwords in application environments. Database reliability is managed natively by AlloyDB through automated backups and point-in-time recovery, avoiding custom disaster recovery procedures.
In production, this consolidated architecture supports:
-
More than 210,000 tenders in the catalog, with embeddings stored directly alongside them
-
Rebuilding the semantic index embedded 115,820 records in 10.6 minutes with the Gemini embedding model, for around three dollars in API spend; AlloyDB auto embeddings now keep those vectors current.
-
Retrieval reranking executed directly inside the database using the ai.rank function — with mean latency of 77-milliseconds – returning the most relevant results for search queries without requiring a standalone reranking microservice
Accelerating semantic search by 47x
Semantic search across the tender catalog initially relied on unindexed vector comparisons, where a representative query took 1.14 seconds. Migrating this workload to a ScaNN index in AlloyDB reduced query latency to 24 milliseconds — a 47x improvement.
The index recommendation originated from the AI agent during an automated performance audit, where it benchmarked the query plan before preparing the index migration.






