SwiftKey Next-Word Predictor: Pitch Deck

Pulkit Kumar | Data Science Specialization Capstone
October 2026

Slide 1: Executive Summary & The Problem

  • The Challenge: Mobile device usage accounts for >60% of daily digital interactions, yet touchscreen typing remains slow, cumbersome, and prone to typographical errors.
  • The Solution: An intelligent, ultra-fast Next-Word Prediction Engine that predicts what the user will type next, saving over 40% of keystrokes.
  • The Value Proposition:
    • Blazingly fast inference (< 1 ms per suggestion).
    • Minimal physical RAM footprint (~32 MB), ideal for low-spec mobile devices.
    • Deployed as an intuitive, zero-configuration Shiny Web Application.

Slide 2: Data Engineering & Linguistic Structure

Trained on a massive English corpus of 4.27 million lines (~102 million words) across Blogs, News, and Twitter:

  • Data Cleansing: Cleaned non-ASCII noise, removed URLs, emails, twitter handles (@user), numbers, and offensive profanity.
  • Linguistic Distribution: Confirmed Zipf's Law—a small subset of unique words accounts for over 90% of total word instances.
  • N-Gram Cascade: Compiled frequency tables for 1-grams (unigrams), 2-grams (bigrams), 3-grams (trigrams), and 4-grams (quadgrams).

Slide 3: Prediction Algorithm: Stupid Backoff

Our prediction pipeline combines maximum likelihood estimation with Stupid Backoff and intelligent memory pruning:

  1. 4-Gram Match: Evaluates the last 3 words typed: \( S(w_i | w_{i-3}^{i-1}) = \frac{\text{count}(w_{i-3}^i)}{\text{count}(w_{i-3}^{i-1})} \)
  2. 3-Gram Backoff: If unobserved, backs off with discount factor: \( S = 0.4 \times S(w_i | w_{i-2}^{i-1}) \)
  3. 2-Gram Backoff: If still unobserved, backs off to bigrams: \( S = 0.4^2 \times S(w_i | w_{i-1}) \)
  4. 1-Gram Baseline: Defaults to highest-frequency unigrams as a safety net.
  5. Pruning Optimization: Pre-sorted and retained top-5 candidates per prefix, slashing RAM overhead by 90%.

Slide 4: Quantitative Performance & Benchmarks

Rigorous empirical evaluation on a 500-phrase held-out test set demonstrates market-leading responsiveness and accuracy:

Metric Measured Value Mobile Target
Inference Latency (Mean) 0.79 ms < 50 ms (Pass: 60x faster)
Median Latency 0.75 ms < 20 ms
RAM Footprint 32.85 MB < 100 MB
Top-1 Prediction Accuracy 18.80 % Industry standard
Top-3 Prediction Accuracy 29.00 % High-utility envelope

Slide 5: The Shiny App & Product Pitch

Interactive User Experience:

  • Real-Time Responsiveness: Instant prediction updates dynamically as characters and phrases are typed.
  • Single Best Prediction & Alternatives: Prominently highlights the primary word recommendation along with top alternative candidates.
  • 1-Click Quick Samples: Preloaded benchmark phrases for immediate testing.
  • Diagnostic Telemetry: Displays the exact backoff tier and latency in milliseconds.

Why Back This Product? A production-ready, production-grade NLP product combining theoretical rigor, exceptional low latency, and delightful user experience.