Now optimized single query to get relevant images based on caption