Constrained text generation is a natural language processing task in which a language model produces text that strictly satisfies a predefined set of conditions or rules while maintaining fluency and coherence. These constraints can be lexical, such as requiring or forbidding specific words and phrases, structural, such as adhering to a target length or format schema, or logical, such as fulfilling combinations of positive and negative keyword requirements. Rather than relying solely on the unconstrained probability distribution of a language model, constrained text generation guides the generation or decoding process to systematically explore output paths that fulfill all specified requirements, making it essential for applications such as terminology-controlled machine translation, table-to-text generation, and keyword-guided writing.