--- license: cc-by-4.0 task_categories: - text-retrieval - sentence-similarity - text-classification language: - ru - en pretty_name: LitRetrieval tags: - literature - russian - english - retrieval - dense-retrieval - contrastive-learning --- # **LitRetrieval: Russian & English Literature Retrieval Dataset** This dataset is designed for training and evaluating text retrieval, sentence similarity, and instruction-following models on rich literary texts in both **Russian** and **English**. It features deep semantic challenges, complex narrative vocabulary, and metaphorical structures typical of classic and contemporary literature. ## **Dataset Summary** The dataset supports contrastive learning and retrieval-augmented generation (RAG) paradigms by grouping data into triplets: {anchor, positive, negative} along with a task identifier and a natural language instruction. It covers three distinct task types: 1. **Query --> Document (retrieval)**: Finding a relevant literary passage based on a descriptive or thematic natural language search query. 2. **Document <--> Document (sts)**: Matching semantically equivalent or highly similar literary passages (using paraphrasing and close-match mapping). 3. **Document --> Emotion (classification)**: Classifying the dominant emotion of a passage into one of seven categories: *guilt, sadness, anger, shame, anxiety, fear, joy*. ## **Dataset Structure** Each sample in the dataset contains the following fields: * anchor: The input query, source document, or instruction-based prompt. * positive: The ground-truth target text (the correct passage, paraphrased match, or correct emotion label). * negative: A challenging distractor text (hard negative). * task: The type of task (retrieval, sts, or classification). ### **Task Profiles & Instructions** The dataset contains three specific system instructions mapped to the tasks: | Task Type | Instruction Context | Output Goal | | :---- | :---- | :---- | | **retrieval** | "Instruct: Given a search query, retrieve relevant passages that answer the query" | Retrieves a literary paragraph based on a descriptive query. | | **sts** | "Instruct: Given a document, retrieve semantically related documents" | Matches a document to its semantically equivalent counterpart. | | **classification** | "Instruct: Classify the emotion into one of the following categories: guilt, sadness, anger, shame, anxiety, fear, joy" | Maps a literary narrative to its underlying primary emotion. | ## **Methodology & Dataset Creation** This dataset was constructed using advanced embedding models, vector databases, and state-of-the-art LLMs to guarantee high-quality semantic mapping and challenging hard negatives. ### **Positive Samples (Vector Retrieval / LLM Generation)** * **Semantically Retrieved**: Chosen using similarity search to capture naturally occurring parallel text pairs and close contextual equivalents. **LLM Paraphrased**: To ensure diverse syntax while keeping the precise literary meaning intact, of the positive matches were generated using **Gemini Flash**, resulting in high-fidelity paraphrasing of classical and modern prose. ### **Hard Negative Mining (FAISS \+ Qwen-3 8B)** To make the retrieval task sufficiently challenging, negatives are not selected at random. Instead, we performed **hard negative mining**: 1. All documents were vectorized using the **Qwen-3 8B Embedding** model. 2. A **FAISS** vector index was constructed over the corpus. 3. For each anchor, highly similar but contextually incorrect texts were retrieved to serve as challenging distractors (hard negatives), forcing models to learn nuanced differences rather than relying on shallow keyword matching. ## **Licensing & Metadata** * **Author / Creator**: ImpulseLeap / Alexei Goncharov * **License**: Creative Commons Attribution 4.0 International ([CC BY 4.0](https://creativecommons.org/licenses/by/4.0/))