Amazon interview question

How does search prediction work