Artag.dev
VERTICAL 01 // AI ENGINEERING

Production AI Engineering, RAG Pipelines & Autonomous Agents

Applied AI systems engineered like distributed backends: strict tenant-isolated retrieval, deterministic cost gates, multi-provider failover, and seamless human-in-the-loop escalation.

~30%
LLM token cost reduction

Measured in Atiende benchmarks combining Redis exact caching and pgvector semantic caching.

0.92
Cosine similarity threshold

Conservative per-intent threshold that reuses verified answers without sacrificing accuracy.

100%
Multi-tenant isolation

Tenant-scoped vector indexes paired with PostgreSQL Row-Level Security to prevent context leaks.

Production Evidence

Production proof: Atiende multi-channel AI system

Atiende is a multi-channel conversational AI platform (WhatsApp Business API, Instagram, and web chat) grounded in live product catalogs via typed tools, an LLM router with circuit breaker failover, and unified human handoff.

  • Hybrid vector + structured retrieval on PostgreSQL + pgvector for real-time catalog and policy grounding.
  • Three-tier caching architecture: provider prompt caching, Redis exact cache, and pgvector semantic cache invalidated by catalog version.
  • Strict execution guardrails: models never touch the database directly; all actions flow through Zod-validated tools with bounded step counts.
  • Automated LLM evaluation pipelines covering groundedness regressions, price-hallucination checks, and prompt-injection resilience.
Reference Architecture
User (WhatsApp / Web)
   │
   ▼
[HMAC-SHA256 Webhook] ──▶ [Persist + Dedupe] ──▶ [BullMQ Queue]
                                                       │
                                                       ▼
[Redis Exact Cache] ──(miss)──▶ [pgvector Semantic Cache >= 0.92]
                                              │ (miss)
                                              ▼
                       [Tool-Using Agent + RAG (PostgreSQL RLS)]
                                              │
                                              ▼
                       [LLM Router + Circuit Breaker + Guardrails]
Core Stack
PostgreSQL + pgvectorTypeScript / Node.jsPythonRedisBullMQOpenAI / Anthropic APIsZod GuardrailsOpenTelemetry

Technical Scope

AI Engineering Capabilities

AI-01

Multi-Tenant RAG Pipelines with pgvector

Incremental document and catalog ingestion, hybrid lexical + semantic search, and strict database-level tenant isolation.

  • →PostgreSQL + pgvector HNSW schema with Row-Level Security policies
  • →Version-aware incremental indexing and cache invalidation
  • →Source-grounded responses with zero fabricated pricing or policies
AI-02

Autonomous Tool-Using Agents & Human Escalation

Business agents that query ERPs, create orders, book appointments, and escalate seamlessly to human operators in the same thread.

  • →Typed tool contracts with strict schema validation and step limits
  • →Multi-provider LLM router (OpenAI, Anthropic, fallback models) with circuit breaker
  • →Bidirectional human handoff without losing conversation state
AI-03

LLM Cost Engineering & Evaluation

Per-conversation token telemetry, semantic caching, small-model intent routing, and automated regression suites before every deploy.

  • →Exact (Redis) + semantic (pgvector) caching with conservative thresholds
  • →Automated eval harness for accuracy, latency, and safety
  • →Per-tenant token budgets and unit-economics dashboards

Technical Deep Dives

Related Engineering Notes

View all notes

Frequently Asked Questions

Direct Answers

How do you prevent AI agents from hallucinating prices or leaking data across tenants?

Models never answer prices from parametric memory or query tables directly. Every lookup runs through deterministic tools backed by PostgreSQL Row-Level Security scoped to the active tenant, and responses are grounded strictly in retrieved records.

How is the ~30% LLM cost reduction achieved?

Through three sequential layers: deterministic intent short-circuits, an exact normalized-prompt cache in Redis, and a pgvector semantic cache gated at >= 0.92 cosine similarity with automatic catalog-version invalidation.

Do you work with international product teams remotely?

Yes. Based in Colombia (UTC-5, aligned with US Eastern time), Artag Dev partners with remote engineering and product teams across North America, Europe, and Latin America.

Other Engineering Verticals

Ready to ship a production AI or RAG system with predictable unit economics?

Share your use case, data sources, and reliability targets. We will map a concrete architecture and clear delivery milestones.

info@artagdev.com.co+57 320 571 1428Artag Dev · Pereira, Risaralda, Colombia