Autocomplete Dynamic Query based on Text Input

I have an autocomplete that queries to a large dataset, however I need the user to search through this entire dataset while typing in the input field and then the autocomplete results should refresh with the queried text input.

How do I go about doing this?

I don't particularly know how to help you, but this topic might be interesting as you mention "large dataset":