01 / THE IDEA

Poetry generation in practice.

Poetry generation trains a model to produce short, stylistically coherent lines or stanzas given a prompt. Key challenges include preserving metre and imagery, avoiding repetition, and ensuring outputs respect copyright and content safety.

Real-world use case · Proposed extension

A proposed application: assist creative writers with draft lines or alternative phrasings while keeping a human editor in control. This extension is not implemented by the supplied starter.

02 / THE BUILD

How to build a poetry generation system project
step by step.

01

Define the task and data

Collect a licensed corpus of poems, decide output length and prompt format, and define success metrics such as human preference and diversity.

02

Preprocess and tokenise

Cleanline breaks and preserve stanza structure; use a tokenizer suited for poetic punctuation and rare words.

03

Train a baseline model

Fine-tune a small autoregressive model (or train an LSTM baseline) and track perplexity and sample quality over checkpoints.

04

Evaluate and review

Use human evaluations for creativity and coherence, plus automatic checks for repetition, plagiarism and offensive content.

03 / SOURCE SNAPSHOT

What the poetry generation system starter actually does.

The supplied starter creates a small numeric array of seed_examples, computes their centroid and covariance, draws five synthetic multivariate-normal samples clipped to [0,1], and prints them. It does not load text, tokenise, or run any language model or generation routine.

SOURCE EXCERPTPython
centroid = seed_examples.mean(axis=0)
covariance = np.cov(seed_examples.T) + np.eye(seed_examples.shape[1]) * 0.01
synthetic_samples = rng.multivariate_normal(centroid, covariance, size=5)
synthetic_samples = np.clip(synthetic_samples, 0, 1)

print(PROJECT_NAME)
print("Synthetic samples:")
print(np.round(synthetic_samples, 3))
Important limitation

The starter works with small numeric vectors and multivariate-normal sampling; it contains no text data, tokenizer, language model, training loop or inference for poetry. It therefore cannot demonstrate poetry generation quality, metrics like perplexity, or any language-specific failure modes.

04 / BEYOND THE CLASSROOM

Where a poetry generation system project could go next.

PROPOSED BUSINESS CONCEPT

Poetry Generation: a pilot concept

Proposed extension: fine-tune a small autoregressive model on a licensed poem corpus to produce short lines from prompts, and surface multiple candidates for a human editor to choose or edit.

WHO IT COULD SERVECreative writers
FIRST MVPA web demo that accepts a short prompt and returns three candidate lines from a fine-tuned model, with a feedback button that logs human preferences for iterative improvement.
KEY RISKGenerated lines can reproduce copyrighted phrasing, biased or offensive content, or inappropriate attributions; a human editor must review outputs before any publication and the system should include content filters and provenance checks.

This is a potential application pathway, not a delivered product. The supplied starter does not implement this service or validate it with real users.

05 / WHAT YOU TAKE AWAY

What a poetry generation system project puts on your resume.

  • Define a measurable poetry-generation objective and select suitable evaluation metrics such as human preference and diversity.
  • Prepare a poem corpus with attention to stanza structure, rare tokens and copyright-safe licences.
  • Fine-tune or train a small autoregressive model and monitor perplexity alongside human-quality checks.
  • Design a human-in-the-loop review flow that captures preferences and mitigates unsafe or plagiarised outputs.
Want to build this with mentors and a lab?

Networkers Home runs this topic inside its AI Engineer Course, with placement support and hands-on labs.

AI Engineer Course
06 / QUESTIONS STUDENTS ASK

Poetry Generation System project FAQs.

Is this suitable as a final year project?
Yes — generating stylistic lines and stanzas is a solid applied topic for a final year project, with scope to explore modelling, metrics and ethics; scale the work to your timeframe.
What skills and tools will I need?
Familiarity with Python, PyTorch and Hugging Face transformers is important, plus basics of tokenisation, sequence modelling, and dataset curation for poetic text and ethics considerations.
How should I evaluate progress and timeline?
Start with dataset collection and a small finetune experiment, then iterate on decoding and metrics like diversity, rhyme/meter proxies and human evaluation; expect several weeks to produce meaningful results.