Araksha Puri

Built at work by Araksha Puri

Expense fraud detection pipeline

An asynchronous AWS Lambda pipeline that reads expense receipts and flags duplicates, misentries and FX mismatches as they arrive.

How it works

  • A two-stage Lambda pipeline: one function ingests expense reports and fans attachments out through SQS; the second pulls each file from S3 and runs OpenAI Vision for OCR and structured extraction.
  • SimHash-based 64-bit embeddings stored in PostgreSQL with pgvector and HNSW indexing find duplicates using weighted similarity across vendor, invoice, amount, date, buyer and line items.
  • Vector similarity joins power live duplicate, misentry and FX-mismatch detection, and suspicion scores update retroactively as new reports and rejected items arrive.
  • PostgreSQL row-level locking coordinates concurrent Lambda invocations, and SQS retries back off progressively before classifying a permanent failure after five attempts.

This was built for an employer, so the code isn’t public. Happy to talk through the design.