← Latest papers
🤖 AI

Qwen Goes Brrr: Off-the-Shelf RAG for Ukrainian Multi-Domain Document Understanding

This paper presents a high-performing retrieval-augmented pipeline for the Ukrainian multi-domain document understanding task that leverages contextual chunking, question-aware dense retrieval, and reranking conditioned on answer options to achieve top leaderboard scores by prioritizing document structure preservation and answer-space awareness over complex heuristics.

Original authors: Anton Bazdyrev, Ivan Bashtovyi, Ivan Havlytskyi, Oleksandr Kharytonov, Artur Khodakovskyi

Published 2026-05-12
📖 5 min read🧠 Deep dive

Original authors: Anton Bazdyrev, Ivan Bashtovyi, Ivan Havlytskyi, Oleksandr Kharytonov, Artur Khodakovskyi

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are a detective trying to solve a mystery, but instead of a single clue, you have a library full of thousands of books, and you need to find the exact sentence that answers a specific question. That is essentially what this paper is about: building a smart system to read Ukrainian documents and answer multiple-choice questions.

Here is the story of how the team built their "detective," broken down into simple concepts.

The Challenge: The Needle in a Haystack

The team participated in a competition called UNLP. The rules were tricky:

  1. The Task: You get a question with six possible answers (A–F). You must pick the right one, tell the system which PDF document it came from, and even which page.
  2. The Problem: The documents are long, messy PDFs (like legal or technical manuals) with different layouts. The questions are in Ukrainian, a language with fewer AI tools available compared to English.
  3. The Catch: The system had to run on a specific computer (Kaggle) with a strict time limit and no internet. It couldn't just "think" for hours; it had to be fast and efficient.

The Solution: A Three-Step Detective Team

Instead of trying to build one giant, super-complex brain, the team built a pipeline with three specialized workers. They call this a "Retrieval-Augmented" system, which is just a fancy way of saying: "Go find the info, then decide the answer."

Step 1: The Librarian (Contextual Chunking)

Imagine trying to read a book where the pages are ripped out and shuffled randomly. That's what happens if you just feed a PDF into a computer.

  • What they did: They didn't just cut the text into random pieces. They acted like a careful librarian who respects the book's structure. They kept the chapter titles, section headers, and the beginning of the document attached to every piece of text.
  • The Analogy: Instead of handing the detective a loose sentence that says "The meeting was at 5 PM," they handed them a note that said, "Chapter 4: Scheduling, Section 2: The meeting was at 5 PM." This extra context helps the computer understand where the information lives.

Step 2: The Search Engine (Dense Retrieval)

Now the system has millions of these "contextual notes." It needs to find the top 20 most likely candidates.

  • What they did: They used a pre-trained AI model (called Qwen3-Embedding-8B) to act as the search engine. This model turns the question and the text notes into mathematical "fingerprints." It compares the fingerprints to see which notes match the question best.
  • The Discovery: They found that using a larger, pre-trained model right out of the box worked better than trying to teach a smaller model new tricks. It was like hiring an experienced librarian rather than training a new intern from scratch.

Step 3: The Judge (Option-Aware Reranking)

The search engine gave them 20 good notes, but they need the best one.

  • The Twist: Most systems just look at the question. This team realized that for multiple-choice questions, the wrong answers matter just as much as the right one.
  • What they did: They built a "Judge" (a Qwen3-Reranker) that looks at the question and all six answer options together. It asks: "Does this text support Answer A, or does it actually support Answer B?"
  • The Analogy: Imagine a lawyer arguing a case. If you only show them the evidence for the prosecution, they might miss the nuance. But if you show them the prosecution's evidence and the defense's arguments, they can pinpoint exactly which piece of evidence wins the case. This step was a game-changer, significantly boosting their accuracy.

Step 4: The Final Verdict (Answer Selection)

Finally, the system takes the top 2 best notes and asks a powerful AI (Qwen3-32B) to pick the final answer.

  • The Trick: To keep it fast and prevent the AI from "hallucinating" (making things up), they forced it to pick only one letter (A, B, C, D, E, or F). It's like a multiple-choice bubble sheet where the AI can only fill in one circle.

What They Learned (The "Secret Sauce")

The paper highlights a few key lessons that surprised them:

  1. Structure is King: Keeping the document's structure (headings, sections) attached to the text chunks was more important than adding complex, fancy math tricks later on.
  2. Less is More: They tried to build a "smart agent" that could search, think, and search again (like a human detective). It was too slow and made mistakes. A simple, straight-line pipeline (Search → Rank → Answer) was faster and more accurate.
  3. The "Unseen" Domain: The competition had a hidden third category of documents the AI had never seen before. Systems that tried to guess which category a question belonged to failed. The best strategy was to let the search engine look at everything without trying to sort it first.

The Result

By using this three-step team (Librarian + Search Engine + Judge), they achieved a very high score.

  • The Improvement: Adding the "Judge" step (reranking) boosted their ability to find the right document from 69% to 79%.
  • The Final Score: Their system got the right answer 96% of the time on the hidden test set, beating many other competitors.

In Summary

The paper proves that you don't need a super-complex, custom-built robot to solve hard document problems. Instead, you need a well-organized pipeline that respects the structure of the documents and uses smart, pre-trained AI tools to look at the whole picture (question + all answers) before making a decision. They essentially showed that for Ukrainian document understanding, organization and context beat complexity.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →