All work

backend

Axiom AI

Semantic product search and a conversational assistant over a print catalogue

Senior Software Developer2025

The problem

Print catalogues are organised the way a print shop thinks, not the way a customer asks. Someone wanting "thick matte business cards that feel premium" gets nothing from a keyword index built around SKU names, stock weights and finish codes. Search was returning empty results for questions that had perfectly good answers in the catalogue.

Hybrid retrieval, not just vectors

Pure semantic search is good at intent and bad at exact tokens — it will happily miss a specific SKU or dimension. Pure full-text is the reverse. The service runs both and combines them.

  • Product records are embedded with OpenAI embeddings and stored in PostgreSQL via the pgvector extension.
  • PostgreSQL full-text search runs alongside for exact and near-exact term matching.
  • Results from both paths are merged so descriptive queries and precise SKU lookups both land.
  • Embeddings regenerate automatically when a product is added or updated, so the index cannot silently drift from the catalogue.

The conversational layer

On top of retrieval sits a chat service that answers product questions and makes recommendations, grounded in retrieved catalogue rows rather than free-form generation. A separate search service adds fuzzy matching and NLP normalisation for the long tail of misspellings and abbreviations that a print catalogue attracts.

Structure and operations

The backend is split into config, database, middleware, routes and a service layer, so retrieval logic is testable independently of the HTTP surface. It ships as a Docker image with a compose setup for local Postgres plus pgvector, and a consolidated CLI handles schema migration, seeding and embedding backfill. Rate limiting, CORS and security headers are applied at the edge.

More work