← All work

Metria AI

Conversational business intelligence: executives ask about their metrics in plain language and get answers in seconds, on the web or on WhatsApp.

Role
Founding Engineer · Full-Stack AI
Period
Dec 2024 – Jun 2026
Client
Metria AI (startup) · 5 enterprise clients in 2 countries
  • Python
  • FastAPI
  • LangGraph
  • LangChain
  • OpenAI
  • PostgreSQL + pgvector
  • ChromaDB
  • Prophet
  • React
  • TanStack Query
  • AWS
  • Terraform

Context

Metria connects to a company’s ERP, CRM, databases and spreadsheets so business leaders can ask questions like “how did sales do this month?” and get a direct answer instead of waiting for a report. I joined as the first engineer and built the product with a team that grew from 2 to 5.

The problem

Answers had to be fast and grounded in each client’s own data, which arrived as Excel files, PDFs and live databases. Clients also wanted projections, not just history, and they didn’t want sensitive numbers sent to an external model.

Architecture

Follow the flow as you scroll. Each step shows what it does.

01 Client dataExcel · PDF · DBs02 Ingest queueAmazon SQS03 ChunkingPython04 Vector storepgvector + ChromaDB cache05 AgentLangGraph + tools06 AnswerWeb · WhatsApp01 Client dataExcel · PDF · DBs02 Ingest queueAmazon SQS03 ChunkingPython04 Vector storepgvector + ChromaDB cache05 AgentLangGraph + tools06 AnswerWeb · WhatsApp
  1. Client dataFiles and live sources from ERPs, CRMs and databases.
  2. Ingest queueUploads are processed asynchronously so the app never blocks.
  3. ChunkingDocuments are split into chunks sized for retrieval.
  4. Vector storeEmbeddings in PostgreSQL, hot chunks cached in memory.
  5. AgentPicks tools: retrieval, SQL, Prophet forecasts with masked data.
  6. AnswerThe user gets the answer on the dashboard or on WhatsApp.

AWS · SQS · CloudWatch · Sentry — all in Terraform

resource "aws_sqs_queue" "ingest" {
  name = "metria-ingest"
}

resource "aws_db_instance" "main" {
  engine = "postgres" # + pgvector
}

resource "aws_cloudwatch_log_group" "api" {
  name = "/metria/api"
}

What I did

  • Owned the architecture, development and AWS deployment of the core product features.
  • Optimized the production RAG pipeline over Excel and PDF files, cutting processing time from ~80 s to ~34 s with chunking and in-memory caching.
  • Built LangGraph agents with tool calling to answer business questions over each client’s data.
  • Built the forecasting module with Prophet, masking sensitive data before anything reached the LLM.
  • Integrated WhatsApp as a channel so users could ask about their metrics from their phone.
  • Migrated across SQLite, PostgreSQL, AWS LightSail and vector databases to cut costs and improve performance.
  • Defined the infrastructure in Terraform, with CI/CD on GitHub Actions, SQS queues and monitoring in CloudWatch and Sentry.

Key decisions

Cache in memory, keep pgvector as the source of truth

pgvector lives next to the business data in PostgreSQL, so there is one database to run. ChromaDB in memory serves the hot chunks, and together with better chunking it took processing from 80 s to 34 s.

Mask before the model sees it

Forecasts run with Prophet on real numbers, but the LLM only gets masked values to explain them. Clients get useful answers without sending sensitive data to a third party.

Infrastructure as code from the start

With a small team, Terraform made every environment reproducible and every infra change reviewable in a pull request, which also made onboarding new engineers simpler.

Results

  • −57%RAG processing time (80 s → 34 s)
  • 5enterprise clients in 2 countries
  • 2 → 5engineers, 2 of them onboarded by me
RAG processing time
Before80 s
After34 s