Automatically generated poetry and fiction
Generative literature is poetry or fiction that is automatically generated, often using computers. It is a genre of electronic literature, and also related to generative art. 
John Clark's Latin Verse Machine (1830–1843) is probably the first example of mechanised generative literature, while Christopher Strachey's love letter generator (1952) is the first digital example. With the large language models (LLMs) of the 2020s, generative literature is becoming increasingly common.
Definitions.
Hannes Bajohr defines generative literature as literature involving "the automatic production of text according to predetermined parameters, usually following a combinatory, sometimes aleatory logic, and it emphasizes the production rather than the reception of the work (unlike, say, hypertext)." 
In his book "Electronic Literature", Scott Rettberg connects generative literature to avant-garde literary movements like Dada, Surrealism, Oulipo and Fluxus. Bajohr argues that conceptual art is also an important reference.
Paradigms of generative literature.
Bajohr describes two main paradigms of generative literature: the "sequential paradigm", where the text generation is "executed as a sequence of rule-steps" and employs linear algorithms, and the "connectionist paradigm", which is based on neural nets. The latter leads to what Bajohr calls a "algorithmic empathy:" "a non-anthropocentric empathy aimed not at the psychological states of the artists but at understanding the process of the work’s material production."
Poetry generation.
The first examples of automated generative literature are poetry: John Clark's mechanical Latin Verse Machine (1830–1843) produced lines of hexameter verse in Latin, and Christopher Strachey's love letter generator (1952), programmed on the Manchester Mark 1 computer, generated short, satirical love letters. 
Examples of generative poetry using artificial neural networks include David Jhave Johnston's ReRites. 
Narrative generation.
Story generators have often followed specific narratological theories of how stories are constructed. An early example is Grimes' Fairy Tales, the "first to take a grammar-based approach and the first to operationalize Propp's famous model." Mike Sharples and Rafael Peréz y Peréz's book "Story Machines" gives a detailed history of story generation.
"Storyland" by Nanette Wylde is an example of generative narrative. Jonathan Baillehache compares "Storyland" to Surrealist writing. Baillehache states, "When compared to earlier uses of chance operation in literature, a piece like this one resembles some of the automatic writings produced by André Breton and Philippe Soupault in their collective work "The Magnetic Fields". . . The difference between Nanette Wylde’s "Storyland" and Breton and Soupault’s "Magnetic Fields" is that the former is produced according to a computational algorithm involving randomizers and user interaction, and the latter by two free-wheeling human subjects."