Inspiration

Literary Oracle was initially inspired by a very personal experience of being comforted by literature.

A line from Marianne Moore’s Roses Only — “it is better to be forgotten than to be remembered too violently. The thorns are the best part of you” — comforted me while I was leaving a very difficult environment. Unfortunately, the poem is not yet in the public domain in both the United Kingdom and the United States, so the line that inspired this project is not included in the product’s archive.

The project’s form and interaction were also inspired by tarot cards and The Book of Answers.

What it does

  • Input and selection

    • The user writes what has recently been on their mind.
    • The user can allow the system to detect the language automatically from the input or manually select one of the 19 supported languages for the displayed literary passage.
    • A slider controls how closely the result should follow the user’s words and how much should be left to chance. Towards Closer to my words, the system gives more weight to semantic relevance. Towards Leave more to chance, the candidate pool and randomness gradually increase.
    • After the user selects Draw from the archive, an archive drawer opens. The system performs semantic retrieval, candidate reranking and random selection within a fixed literary archive, then displays a literary card.
  • Literary card and sources

    • The front displays the literary passage in the language detected by the system or manually selected by the user, together with its author, work and type.
    • Turning the card reveals the accurate original text, original language, original work title, year, passage type, English context, author biography, direct full-text source, public-domain status and machine-assisted translation note.
    • The original text, context and direct source remain available so that the user can verify where the words came from and reduce the possibility of a passage being misread after being separated from its work.
    • The result page also shows the original language, the current chance level and the number of candidate passages opened for that draw.
  • Saved passages

    • Saved passages button in the upper-right corner opens the complete saved collection. The user can reopen, share or remove passages from it.
  • Share images

    • Share card generates a PNG in the browser using the site’s colours and archive design. The user can download the image.
    • The image includes the literary passage, author, work, year, original language and source label. When the displayed language differs from the original, the original text is also included. The share image never contains the private text that the user originally entered.
  • Safety handling

    • The safety system combines local context rules with Azure AI Content Safety.
    • Input that clearly describes current self-harm, preparation to act or an inability to remain safe stops literary selection and opens a support page.
    • Ambiguous or concerning input first asks whether the user is currently safe. The user can continue after confirming that they are safe or enter the support page if they choose that they need help.
  • Privacy and accessibility

    • The site requires no account and does not persistently store user input.
    • The main flow supports keyboard navigation, visible focus states, screen-reader labels, live status announcements, prefers-reduced-motion and responsive layouts.
    • Literary passages carry the appropriate language attributes, and Arabic literary text and share cards support right-to-left display.
  • Visual and interaction design

    • The complete interaction uses the visual language of a vintage literary archive.
    • Muted green, paper grey, dark red and traditional serif typefaces.
    • The interaction includes an opening archive drawer, an appearing card and a card-turning process.

Why I Built This

AI and the Human

I think this project, at a time when AI is bringing widespread disruption and anxiety, can clearly show what AI can do and what humans can do.

Many AI companions pretend to be real people and offer an endless stream of reassurance and praise that no real person could provide, accompanied by unreliable and false memories and hallucinations. Even setting aside the possibility of emotional dependence, this creates for me a kind of uncanny valley effect that is anthropomorphic yet inhuman.

This does not mean that I dislike AI. On the contrary, I find AI extremely useful for many mechanical and technical tasks. In this project, AI handles semantic retrieval, candidate reranking, safety assessment and research organisation. What ultimately reaches the user is a finite piece of writing created by a particular person a century ago. At least in their thought and feeling, those words genuinely existed.

The emptiness of AI companionship can sometimes deepen loneliness in an already atomised world. This project offers a one-way connection and a form of comfort across a century, requiring no reply from the person on the other side.

The Global Village and Literature

I am part of Gen Z. When I was young, the idea of a “global village” was widespread. The internet was still emerging. I remember using enormous desktop computers at home and wearing shoe covers in computer class. Both the economy and the internet seemed full of growth and hope. It felt possible to believe that the future would be better, that humanity shared a common destiny, and that everyone truly belonged to one family moving together towards connection without borders, peace and economic prosperity.

Today, I rarely see similar discussions online. The fantasy seems to have burst like a bubble. Yet I grew up surrounded by that belief. I genuinely believed in it then, and I am still willing to believe in it now.

I have always felt that literature belongs to the world. The global village may have faded from the physical and digital worlds, but language, communication and literature can still build a genuine spiritual community across time and borders. In a single moment, through a form of communication unique to our species, a person can cross the barriers of language, race and history and encounter a distant or ancient soul.

This is also why I tried to include cultures from different regions in the archive and insisted on preserving original texts in less widely represented languages. At a time when the training data of large models remains heavily centred on English, literature in smaller languages is almost voiceless within mainstream AI systems. Preserving original texts and sources in Japanese, Spanish, Russian, Arabic and other languages is an act of respect for literary preservation and also part of my position.

These texts have their own languages, historical periods and ways of understanding the world. When one sentence crosses all of these boundaries and reaches another person in another time, understanding remains possible. For me, this may be the global village that never entirely disappeared.

The bubble may have burst, but the light it once reflected was real.

How we built it

  • Backend and archive: Java 17, Spring Boot 4.1.0, REST APIs and a structured JSON archive.
  • Frontend: HTML, CSS and vanilla JavaScript, with local saving, Canvas-generated share images, responsive design and accessibility support.
  • Retrieval and language: Semantic retrieval and reranking, a slider-controlled balance between relevance and chance, Lingua language detection and a local fallback system.
  • Safety and deployment: Azure AI Content Safety with local context rules, packaged with Docker and deployed on Render.

AI Use

  • Runtime AI: jina-embeddings-v3 and jina-reranker-v3 for retrieval, plus Azure AI Content Safety for risk assessment. Both use free tiers.
  • Development AI: Codex for programming and code revisions, with ChatGPT and Claude for research organisation, research and language assistance through paid plans.

Challenges we ran into

The greatest challenge was building a trustworthy world-literature archive. I originally hoped to find an existing human-curated collection, but I could not find one that combined public-domain status, accurate original texts, direct full-text sources, multilingual coverage and structured information. Famous quotations online often lack information about their works, rely on copyrighted modern translations or are attributed to the wrong author. I therefore decided to select the authors myself.

Many authors from my original list remain under copyright. Writers I had hoped to include, such as Borges and Hesse, were ultimately left out of the archive, which I regret. Even when the original work is in the public domain, a modern published translation may carry its own copyright. Every passage therefore required a distinction between the original work, a published translation and the project’s machine-assisted translation. Passages whose original text, work or source could not be reliably verified were excluded from the official literary archive.

Another challenge was safety assessment. Literature naturally deals with death, grief, loneliness and despair. Keyword-only detection can easily mistake metaphor, literary discussion or ordinary distress for immediate danger. Removing safeguards entirely could allow the system to continue returning literary passages after a genuine crisis statement. I eventually combined Azure AI Content Safety with local rules to distinguish clear risk, ambiguous language and input for which literary selection can continue.

The scale and structure of the archive directly affect the experience of real users, so I reviewed the author list individually. The limited competition period left uneven depth across authors and regions. Some writers from underrepresented regions currently have only one or a few passages. Continuing to verify authors, works, sources and copyright status will require more time.

Accomplishments that we're proud of

  • Built, tested and deployed the complete project independently during the 48-hour hackathon.
  • Curated 440 passages from 39 authors, with 19 display languages and verifiable source information.
  • Combined semantic retrieval, chance, safety, privacy, accessibility, saving and sharing in one working application.
  • Created 240 passing automated tests covering the archive, retrieval, language detection, safety, API and frontend contracts.

What we learned

  • Literary archives require separate checks of original works, translations, copyright, attribution and direct sources.
  • Semantic relevance, randomness and contextual safety rules must be carefully balanced to keep the experience useful, surprising and responsible.

What's next for Literary Oracle

A possible next step is to continue expanding the literary archive. I would like to add more works from authors who currently have lighter coverage and deliberately include more voices from Africa, the Middle East, Southeast Asia, Oceania and other underrepresented regions.

The site can display literary passages in 19 languages according to the input language, but the overall interface remains in English. Another possible next step is full interface localisation, allowing navigation, explanations, safety pages, saved passages and work details to use the language selected by the user.

Once the archive has sufficiently broad and reliable geographical coverage, I would like to add a world-literature map. Users could see where each author came from and enter works from different regions through the map. The map would also keep the archive’s current geographical gaps visible and remind the project to continue seeking voices that remain underrepresented.

Tracks

  • Main track: Happiness The project uses real literature to offer moments of comfort, chance and another perspective in everyday life.

  • Bonus track: Best Use of AI AI supports cross-language semantic retrieval, candidate reranking and safety assessment.

Built With

Share this project:

Updates

Submission history