def run_generation(sequences, max_tokens):
        """
        Run LLM generation on provided sequences.
        """
        prompts = [s['prompt'] for s in sequences]
        sampling_params = SamplingParams(
            max_tokens=max_tokens,
            temperature=temperature, 
            top_p=top_p, 
            top_k=top_k_sampling, 
            repetition_penalty=repetition_penalty,
            stop=[END_SEARCH_QUERY, END_URL, tokenizer.eos_token],
            include_stop_str_in_output=True,
        )
        output_list = llm.generate(prompts, sampling_params=sampling_params)
        return output_list

        Run LLM generation on provided sequences.
        
scripts/run_rag_agent.py