Ensuring Safe and High-Quality Outputs: A Guideline Library Approach for Language Models