Skip to content
Raisalon

Machine learning · Generative AI

Salon Rai builds ML and GenAI systems that ship.

Computer vision, forecasting, and LLM applications, trained, evaluated, and deployed behind real APIs.

Salon Rai at a desk with code on the monitors behind
  • Computer visionCNNs · OpenCV
  • LLM apps & RAGEmbeddings · Ollama
  • Model to productionFastAPI · React

Expertise

What I work on

From classical models to LLM applications, with the engineering to put them in production.

  • Machine learning

    Supervised models on structured data, with leakage-free splits and evaluation that goes beyond accuracy: precision–recall, F1 averaging, and ranking metrics.

    • scikit-learn
    • XGBoost
    • pandas
    Machine learning articles
  • Deep learning & computer vision

    Fine-tuning pretrained vision models, two-tower retrieval models for recommendations, and optimizing models for fast inference with ONNX.

    • PyTorch
    • TensorFlow
    • OpenCV
    Deep learning case studies
  • Generative AI & LLMs

    LLM applications with retrieval: embedding search, measuring RAG retrieval quality, prompt regression tests in CI, and local models with Ollama.

    • LangChain
    • RAG
    • Vector databases
    Generative AI articles
  • ML engineering & deployment

    Turning models into products: Python APIs for inference, React front ends for the people who use them, and automated tests and deploys.

    • FastAPI
    • Docker
    • MLflow
    All projects

Selected work

Case studies

Production-style systems companies deploy today: RAG, agents, document AI, text-to-SQL, fraud detection, and recommendations.

All 10 projects

Generative AIPlanned

Document Q&A with RAG and an evaluation suite

Solo project: ingestion, retrieval, evaluation suite, and API

  • Python
  • FastAPI
  • pgvector
  • Embeddings
  • LLM APIs
  • Promptfoo
Problem
Answer questions over real PDF documents with cited sources, and prove with numbers how often the answers are right.
Planned approach
Chunked PDFs with headings and table headers kept, embeddings in pgvector, hybrid keyword and vector retrieval, and an LLM that answers only from cited passages.
Design decisions
  • Retrieval measured with recall@k and MRR before any prompt tuning, because a perfect prompt cannot fix a missed passage.
  • The service refuses when nothing relevant is retrieved, trading coverage for trust.
Evaluation plan
A labelled question set scored for recall@k, MRR, answer faithfulness, refusals, and cost per query, run in CI with Promptfoo.

Generative AIPlanned

Tool-using LLM agent with tracing and guardrails

Solo project: tools, agent loop, guardrails, and tracing

  • Python
  • LLM APIs
  • Tool calling
  • FastAPI
  • SQLite
  • Langfuse
Problem
Complete real tasks with an LLM that calls APIs and queries data, and stay reliable when a tool fails or returns nothing.
Planned approach
Typed tools validated with Pydantic, a step-limited agent loop, read-only data access, and every run traced with Langfuse.
Design decisions
  • Read-only tools by default, with confirmation before any action that changes data.
  • Failure injection in tests: tools that time out or return errors, to check the agent recovers or stops cleanly.
Evaluation plan
Task success rate, steps per task, and cost per task on a fixed benchmark of tasks with known outcomes.

Generative AIPlanned

Document AI for structured data extraction

Solo project: OCR pipeline, LLM extraction, validation, and API

  • Python
  • OCR
  • LLM APIs
  • Pydantic
  • FastAPI
  • PostgreSQL
Problem
Turn scanned invoices and forms into structured records a downstream system can trust.
Planned approach
OCR with layout preserved, LLM output constrained to a Pydantic schema, and arithmetic and format checks on every record.
Design decisions
  • Schema-validated output, so malformed responses are caught instead of stored.
  • Fields that fail validation go to a review queue rather than being guessed.
Evaluation plan
Field-level precision and recall on a labelled document set, the straight-through rate, and cost per document.

Generative AIPlanned

Text-to-SQL analytics assistant with guardrails

Solo project: schema context, SQL generation, validation, and API

  • Python
  • LLM APIs
  • PostgreSQL
  • SQLGlot
  • FastAPI
  • Pydantic
Problem
Let non-technical teams ask questions of a production database without writing SQL, and without risking data or wrong numbers.
Planned approach
Schema descriptions and example queries in the prompt, LLM-generated SQL parsed and checked with SQLGlot, and execution on a read-only replica with row and time limits.
Design decisions
  • A read-only database role and a parser check that rejects anything but a single SELECT, so a bad generation can never modify data.
  • Every answer shows the SQL that produced it, so analysts can verify the numbers instead of trusting them blindly.
Evaluation plan
Execution accuracy on a labelled question set (do the results match a hand-written query?), the refusal rate on unanswerable questions, and latency per answer.

Traditional machine learningPlanned

Real-time fraud detection with explainable scores

Solo project: features, models, thresholds, and scoring API

  • Python
  • pandas
  • XGBoost
  • scikit-learn
  • SHAP
  • FastAPI
Problem
Flag fraud in transaction data where fraud is under 1% of cases, and explain every flag to the analyst who acts on it.
Planned approach
Time-ordered splits, behavioural features without look-ahead, XGBoost against a logistic-regression baseline, and SHAP explanations per score.
Design decisions
  • The decision threshold is set from the cost of a missed fraud against an unnecessary review, not the default 0.5.
  • Class weights instead of blind oversampling, so the validation data keeps its real class balance.
Evaluation plan
Average precision, recall at a fixed review budget, an expected-cost curve, and p95 scoring latency.

Deep learningPlanned

Two-stage recommendation system

Solo project: retrieval model, ranker, and serving API

  • Python
  • PyTorch
  • FAISS
  • LightGBM
  • pandas
  • FastAPI
Problem
Recommend items from a large catalogue quickly enough for a live request.
Planned approach
A two-tower model for candidate retrieval with FAISS, a gradient-boosted ranker on top, and a popular-items fallback for new users.
Design decisions
  • Two stages, as production platforms do: cheap retrieval over the whole catalogue, then an expensive ranker on a few hundred candidates.
  • Popularity and co-occurrence baselines first, so every model has to beat something simple.
Evaluation plan
Recall@k for retrieval, NDCG@k and MAP@k for ranking, catalogue coverage, cold-start quality, and latency.

Approach

How I build ML systems

The practices behind every project, each one written up with working code.

  1. 01

    Frame the problem

    Start from the decision the model supports, then choose the metric that matches its cost: recall when misses are expensive, precision when false alarms are.

    Why 99% accuracy can mean zero recall
  2. 02

    Prepare data without leakage

    Check joins for duplicate keys and split by entity, so the test set holds customers or patients the model has never seen.

    Splitting a dataset by customer ID
  3. 03

    Train and evaluate honestly

    Compare against simple baselines and report metrics that hold up under class imbalance: average precision, PR AUC, and macro or weighted F1.

    Average precision vs. PR AUC
  4. 04

    Measure retrieval before prompts

    For LLM applications, evaluate the retriever with recall@k and MRR first, and estimate cost per request before launch.

    Evaluating RAG retrieval with recall@k and MRR
  5. 05

    Serve it behind an API

    Package models behind FastAPI or Flask endpoints with a front end people can use, so results reach users instead of staying in a notebook.

    Deploying a model with FastAPI and Docker
  6. 06

    Test like code

    Run regression tests on prompts and model outputs in CI, so a quality drop fails the build before it reaches production.

    Prompt regression tests in GitHub Actions

Toolkit

Skills & tech stack

Tools I use across the ML lifecycle, from data and training to serving and the product around it.

Programming & data

  • Python
  • SQL
  • TypeScript
  • pandas
  • NumPy
  • Matplotlib
  • Jupyter
  • Git
  • Linux

Machine learning

  • scikit-learn
  • XGBoost
  • LightGBM
  • Feature engineering
  • Time-series forecasting
  • Model evaluation

Deep learning & computer vision

  • PyTorch
  • TensorFlow
  • Keras
  • CNNs
  • LSTMs
  • Transformers
  • Hugging Face
  • OpenCV

Generative AI & LLMs

  • OpenAI API
  • Claude API
  • LangChain
  • LlamaIndex
  • RAG
  • Embeddings
  • Vector databases
  • Prompt engineering
  • Fine-tuning (LoRA)
  • Ollama

MLOps & LLMOps

  • Docker
  • MLflow
  • GitHub Actions
  • Promptfoo
  • Langfuse
  • Model monitoring

APIs & data stores

  • FastAPI
  • Flask
  • Django
  • REST APIs
  • PostgreSQL
  • pgvector
  • SQLite

Frontend for AI products

  • React
  • Next.js
  • Angular
  • Tailwind CSS

Background

From video editing to AI

Each step added a layer, from visual storytelling to the systems behind AI products.

  1. Step 1

    Video editing

    Where it started: storytelling, pacing, and attention to detail in every frame.

  2. Step 2

    WordPress development

    Building and customizing websites, and learning how the web works under the hood.

  3. Step 3

    Full-stack development

    Complete web applications, from React and Angular front ends to APIs and databases.

  4. Step 4Now

    AI & machine learning

    Machine learning, deep learning, and generative AI, from training the model to shipping it in a product.

Writing

Latest on AI & ML

All articles

Free tools

Browser tools

All tools
  • Developer

    JSON Formatter and Validator

    Format, minify, validate, and sort JSON in your browser, with error messages that point to the exact line and column of a syntax problem.

    Open tool

  • Developer

    Base64 Encoder and Decoder

    Encode text to Base64 or decode Base64 back to text, with full UTF-8 support and an optional URL-safe alphabet for tokens and URLs.

    Open tool

  • Developer

    Unix Timestamp Converter

    Convert Unix timestamps in seconds or milliseconds to readable UTC and local dates, and convert dates back to timestamps, with live current time.

    Open tool