Microsoft Interview Question

design a system of query predictor.