def METHOD_NAME(given_prompt, given_passage, flan_model, flan_tokenizer, device):
	given_prompt += "Example 4:\n"
	given_prompt += "Document: " + " ".join(str(given_passage).split(" ")[:256]) #  + "\n"
	input_ids = flan_tokenizer.encode(given_prompt, max_length=2048, truncation=True, return_tensors='pt').to(device)
	if input_ids.shape[0] != 1 or input_ids.shape[1] >= 2048:
	    return ""
	outputs = flan_model.generate(
	    input_ids=input_ids,
	    max_length=32,
	    do_sample=True,
	    top_p=0.95,
	    num_return_sequences=1)
	query = flan_tokenizer.decode(outputs[0], skip_special_tokens=True)
	########################################################
	if query.lower().find("bad question") != -1:
		bad_question_index = query.lower().find("bad question")
		query = query[:bad_question_index]
	query = query.replace("Good Question", "").replace(": ","")
	########################################################
	return query