cs.CLMar 25, 2026

Pingala: Prosody-Aware Decoding for Sanskrit Poetry Generation

Authors: Manoj Balaji Jagadeeshan, Atul Singh, Nallani Chakravartula Sahith, Amrith Krishna, Pawan Goyal

Organizations: Indian Institute of Technology, Kharagpur · Oriflow

Abstract

Poetry generation in Sanskrit typically requires the verse to be semantically coherent and adhere to strict prosodic rules. In Sanskrit prosody, every line of a verse is typically a fixed length sequence of syllables adhering to prescribed binary patterns of syllable weights. We observe that instead of treating a verse as a monolithic sequence, segmenting them as grouped-lines leads to significant improvement in semantic coherence by 10% with comparable metrical adherence. Specifically, Pingala, our proposed decoding approach is designed to encourage every line to have well-formed words and our token selection biases the model towards it by preferring longer tokens. Writing in Sanskrit follows phonemic orthography, hence using a phonetically aware transliteration scheme, SLP1, increased the metrical alignment by 46% with comparable semantic similarity, for a instruction fine-tuned large language models like Phi-4. We also introduce a new approach for reference-free evaluation using cross-encoders which achieved better alignment with true poetry instances.

Figures & tables

Appendix figures & tables6 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Padamitra: Grounded Glossary Generation for Classical Sanskrit

    Aug 25, 2026Manoj Balaji Jagadeeshan, Sai Pragnaan Marala, Pawan GoyalLLM GroundingLow-Resource Language Processing

  2. ShlokaDhara: A Multi-Speaker Sanskrit Speech Corpus for Learning Meter-Aware Prosody in Text-to-Recitation

    Oct 17, 2026Harshal Kausadikar, Onkar Kishor Susladkar, Prathmesh Santosh Choudhari +3Speech ProcessingTTS Synthesis

  3. HaikuS2S: A Cascaded System For Responding In Verse

    Sep 20, 2026Devangi Sharma, Sophia Judicke, Glenda Tan +2TTS SynthesisSpeech Generation Evaluation