Work / Lorely

Conversations grounded in literature

A literary character platform combining retrieval, spoiler boundaries and psychological state.

Visit website
Lorely showcase artwork with mobile book discovery and literary character conversations.Lorely showcase artwork with a desktop reading experience and tablet character conversation.
Lorely product showcase artwork supplied by Dawit. Interface details and figures in the artwork are illustrative.

Overview

Product
AI literary character simulation
Contribution
Hybrid retrieval and character behavior
Stack
React, Flask, PostgreSQL, ChromaDB
Focus
Source grounding and spoiler-aware dialogue

Problem

A character conversation needs a connection to the book.

A literary character interface brings together two constraints. Responses need relevant source material, and that material needs to respect how far the reader has progressed.

Lorely also explores how a character’s internal state can influence a conversation. Retrieval and character behavior therefore need to work together within the same application.

Next · My contribution

My contribution

I built retrieval around semantic and lexical signals.

I engineered a hybrid RAG pipeline combining semantic embeddings, lexical ranking and reciprocal rank fusion. The pipeline supports source-grounded conversations with spoiler boundaries.

I also implemented a psychological engine based on Dörner’s Psi theory. It models six cognitive parameters and five emotional states to adapt character behavior during dialogue.

Next · Architecture

Architecture

The interface, application state and retrieval each have a role.

The project uses React for the reading and conversation experience, Flask for application logic, PostgreSQL for relational data and ChromaDB for vector retrieval. Docker supports the development environment.

React
Reading and conversation interface
Flask
Conversation and character logic
PostgreSQL
Structured application data
ChromaDB
Embedding-based retrieval
Next · Implementation

Implementation

Retrieval and spoiler settings shape the conversation context.

Semantic retrieval and lexical ranking provide different relevance signals. Reciprocal rank fusion combines the ranked candidates, while chapter and spoiler controls constrain the material available to the conversation.

Character-state modeling adds another part of the interaction. Character selection, a spoiler boundary and conversation settings connect the interface to retrieval.

  • Combine semantic and lexical relevance signals.
  • Keep retrieved context within the reader’s spoiler boundary.
  • Model cognitive and emotional state as part of character behavior.
Lorely’s supplied web landing-page showcase with its illustrated literary setting.
Supplied Lorely web showcase. Figures shown in the artwork are illustrative.
Next · Result

Result

One project connects retrieval engineering with a character experience.

Lorely brings a React interface, a hybrid retrieval pipeline and a psychological engine into the same literary conversation platform. The work combines information retrieval with application and interaction design.

The portfolio pairs those engineering details with supplied product showcase artwork.

Let’s build together.

Addis Ababa, Ethiopia · UTC+3

Get in touch