updated the base query generator to allow topic models to be varied