Tanaga Poetic Agent

Tagalog and English Tanaga and Syllabic Verse Poetry Agent. A specialized tool for generating a Tanaga, a native Tagalog form of poetry, in Tagalog and English.

Technical Stack: Python | FastAPI | Ministral 14B | JavaScript

The Agent

System Architecture: This interface directly connects to an agent powered by a Python + FastAPI backend that handles asynchronous requests to the Ministral 14B Base model. The application uses this small language model (SLM) as a custom Prosodic Constraint Engine to audit syllabic density and rhyme schemes in real time. To ensure the secure handling of creative data, the application implements a local Regex-based PII Scrubber to redact sensitive identifiers before the data is processed by the SLM.

Developer's Note on Syllabic Veracity: While it is programmed with strict syllabic anchoring (7-7-7-7 for Tagalog to create a Tanaga and 8-8-8-8 for English to create a Syllabic Verse), users may notice discrepancies. This is due to a known constraint in AI tokenization, where models process characters as data chunks rather than vocalized phonemes. This tool is intended as a collaborative partner for poetic inspiration, appropriate given current copyright restrictions in the United States and the European Union. For user experience, responses are marked with a "meter" tag to indicate whether the output is properly formatted and appropriately syllabified.

Click here to go to the standalone application.

Methodology: Syllabic Idealism

The Tanaga Poetic Agent utilizes a Syllabic Counting & Rhyme-Scheme Protocol designed to honor traditional Tagalog roots while accommodating modern English adaptations through a "Phonetic-First" logic.

  • Language-to-Syllable Mapping: This agent uses the explicitly stated input language to shift its architectural "anchors." For Tagalog, it targets the traditional 7-7-7-7 structure (also known as the Tanaga); for English, it adapts to an 8-8-8-8 structure (also known as the Syllabic Verse).

  • Syllabic Guardrails: To mitigate "Tokenization Hallucination," the agent enforces a strict 3-syllable word ceiling. By prioritizing fewer syllables, the system forces the AI to process the verse in smaller, more mathematically predictable units.

  • Rhyme-Scheme Synthesis: The system performs a real-time audit of the output's syllabic structure. It is designed to maintain integrity across AAAA (traditional monorhyme) and AABB (modern) schemes, ensuring that the phonetic "echo" remains consistent.

  • Talinghaga Integration: Following the pre-colonial tradition, the agent prioritizes the "Talinghaga" (metaphor). The agent is prompted to treat the physical subject as a vehicle for emotional truth, preserving the "soul" of the poem despite syllabic constraints.

Prompt Guide for High-Value Results

To generate the most evocative and structurally sound poetry, use prompts that specify your desired linguistic and structural constraints:

  • The "English Adaptation" Prompt: "Compose an English Tanaga using the 8-8-8-8 structure about 'Shadows' (Anino), focusing on a traditional AAAA rhyme scheme."

  • The "Traditional Tagalog" Prompt: "Write a traditional 7-7-7-7 Tagalog Tanaga about a 'Bangka' (Canoe) as a metaphor for navigating life's uncertainties."

  • The "Structural Audit" Prompt: "Write a Tanaga about 'Fireflies' (Alitaptap) and provide a breakdown of the syllable count for each line to verify the structural constraint."

Legal & Intellectual Property

AI Authorship & Global Jurisprudence: Users of the Tanaga Poetic Agent should be mindful of the evolving legal landscape regarding synthetic content. Under current U.S. Copyright Office guidance, unedited AI-generated content generally lacks the "human authorship" required for copyright protection. However, this is not a global standard; jurisdictions such as the United Kingdom and China have begun to recognize copyright in AI-assisted works under specific criteria.

The Architect's Stance: Within the ICIO (Instructions, Context, Inputs, and Output) framework, this agent is defined as a Collaborative Partner. While the agent provides the structural "scaffolding" and metaphorical "sparks" to help guide the user, the most resonant works result from human intervention. I encourage users to perform significant human edits—not only to infuse the verse with personal soul but to establish a robust claim to intellectual property through transformative authorship, as required by U.S. and EU law.

Explainer

Technical Insight: This Jupyter Notebook demonstrates the algorithmic logic used for syllable counting and auditing during the initial research phase, and was edited to reflect discoveries made during the development of the production-ready application, which features a responsive interface and standardized API lifecycle management.

Click here to view the complete GitHub Repository