Skip to main content
Back to Engineering Notes
AI SystemsNov 2026 · 4 min read

Keeping Multimodal Shop Assistants Honest with Deterministic Catalogue Guardrails

Why SokoSeal Point separates vision and voice perception from price resolution so a retail counter assistant never invents prices or stock counts.

The Problem with Purely Generative Retail Replies

When building SokoSeal Point for busy shop counters in Tanzania, the hardest requirement was not recognizing a product in the camera frame or speaking natural Kiswahili and English. It was trust. A single hallucinated price breaks a shopkeeper's confidence immediately.

Large language models excel at phrasing, translation, and handling noisy bilingual speech, but they should never be the source of truth for structured inventory or pricing.

Separating Perception from Verified Facts

Instead of letting the model speak free-form product prices, the pipeline resolves the pointed item against a deterministic catalogue lookup first. If confidence falls below threshold or the SKU is missing, the assistant asks for confirmation rather than guessing.

interface CatalogueResolution {
  matched: boolean;
  sku?: string;
  verifiedPriceTzs?: number;
  inStock?: boolean;
}

export function resolveProductSafely(
  candidateId: string,
  catalogue: ReadonlyMap<string, { priceTzs: number; stock: number }>
): CatalogueResolution {
  const item = catalogue.get(candidateId);
  if (!item) return { matched: false };
  return {
    matched: true,
    sku: candidateId,
    verifiedPriceTzs: item.priceTzs,
    inStock: item.stock > 0,
  };
}

Takeaway

Good applied AI engineering puts deterministic code around probabilistic models. Let models handle ambiguity in language and vision, and keep business-critical facts strictly validated in TypeScript.