Rhapsodomancy is a form of divination in which guidance was sought through the chance selection of a passage in literature.
It goes back to the ancient Greeks, in which verses uttered by the oracles were transcribed for random consultation in the sybilline books, or in which a phrase from one of the poets was picked on for guidance. Another example is the I Ching, an ancient book of wisdom in which hexagrams are consulted according to a random sequence that is generated by throwing sticks.
Rhapsodomancy comes from the Greek rhapsoidos, someone who recites epic poems, particularly the Homeric odes; its roots are rhaptein, to sew together or stitch, and oide, song (the source of our word ode), so such a person was a weaver of songs. It is closely related to our rhapsody, which originally meant a section of an epic poem suitable for reading at one time, but which later took on the modern sense of some exaggeratedly enthusiastic or self-indulgently effusive piece of writing or music.