Elamur Research

Retrieval Augmented Generation Framework for the Nepali Legal Domain Question Answering

Paper · 2026 · Samir Wagle, Abiral Adhikari, Reewaj Khanal et al.

Summary

Finding an answer in Nepali case law can require searching fragmented digital records and reading decisions written in specialist language. A system that writes fluent answers can make that search easier to use, provided it first finds the decision that actually addresses the question. The authors investigate that condition through retrieval-augmented generation. Their system searches a collection of Supreme Court decisions from the Nepal Kanun Patrika digital archive, reads the selected decision, and answers in Nepali when it finds supporting evidence. The authors present the study as the first systematic test of this approach for Nepali case law. They build a collection of 10,265 unique decisions and assess retrieval with 100 questions curated by legal specialists, each linked to a designated case.

The strongest search result came from BM25, a method that ranks passages by matching the words of a question against the indexed text. When it searched passages, BM25 placed the designated case first for 91% of the questions. Searching complete decisions with BM25 achieved 88% on the same measure. The strongest method that searched by comparing numerical representations of meaning, multilingual-e5-large, achieved 75%. Passage-level BM25 was considerably slower than whole-document BM25. The authors therefore used whole-document BM25 as their standalone word-matching method in the answer experiment, alongside multilingual-e5-large and a method that selected a case by counting agreement across retrieval lists.

Whole-document BM25 produced an answer for 92% of the 100 questions, the highest rate among the tested generation settings. Its answers received 74% groundedness and 85% truthfulness in the automated evaluation, and 84% truthfulness in the human evaluation. Groundedness asked whether the retrieved decision explicitly supported every factual claim. Truthfulness asked whether the answer conveyed the key facts in an expert-curated reference. The distinction matters because the system can miss the right decision, choose the wrong passage within it, or write an answer that goes beyond its evidence. The results establish a baseline for questions about the selected archive. The test is small and mostly factual, and the system that ranked the correct case first most often was excluded from the standalone generation comparison. The study therefore identifies a practical retrieval choice for the experiment while leaving open how the alternatives would perform across a broader range of Nepali legal questions.

Deep dive: Retrieval Augmented Generation Framework for the Nepali Legal Domain Question Answering

This study tests how searching Nepali Supreme Court decisions by words or meaning affects the accuracy of answers to legal questions. · about 33 minutes to read

The problem and its context

The paper begins with a problem of access. Nepal’s legal system draws on common-law and civil-law traditions and operates principally in Nepali. The authors describe legal material that is scattered, unevenly digitized, and sometimes expressed in older terminology. Those conditions put work in the way of a reader before any interpretation begins. Someone may have a clear question and still need to establish which decision concerns it, where that decision can be found, and which part of a long judgment supplies the relevant fact. Specialists face that search burden too, although they may recognize terms and procedural cues that are unfamiliar to a member of the public. The authors put both groups in view when they explain the motivation for Nepali legal question answering.

A search interface can point a reader toward a case. A question-answering interface undertakes a further task by expressing what the case says in response to the question. That difference gives the quality of retrieval particular importance. A list of results leaves several documents visible, while a composed answer directs the reader’s attention to a particular interpretation of the selected material. An incorrect selection can therefore affect both the substance of the answer and the reader’s ability to trace it. The risk the authors emphasize is factual fabrication, but an answer can also go wrong through a much more ordinary mistake, such as describing a genuine legal finding from a case other than the one the question concerns.

The archive gives the study a way to turn that broad access problem into a specific task. The authors work with selected Supreme Court decisions and formulate questions around facts that can be checked against an individual case. The target might be a provision or a party, or it might involve the procedure or reasoning that appears in a decision. These questions differ in how much of the judgment a reader needs to consider. The shared feature is that an expert can say which case the question is about. This makes it possible to judge the search separately from the wording of the answer, a distinction that would be harder to draw for a general request about the law.

Why the authors retrieve at the time of answering

The authors describe Nepali as one of the low-resource languages. Their immediate concern is the scarcity of suitable material for developing and testing a system specialized in Nepali law. Decisions exist in digital form, but there is limited representative material with the annotations needed for training or assessment. The paper treats domain-specific fine-tuning as impractical for this study. Fine-tuning would mean adapting a system’s learned parameters to the legal task with suitable examples. The authors instead place their effort in collecting and cleaning the cases, designing questions with legal experts, and supplying relevant case text at the time a question is asked.

This choice changes the role of the archive. Its decisions become sources to be searched and read for each answer. The generation component receives the selected text together with the question. The authors can then examine whether the system found the intended case and whether the answer is supported by what it received. In a setting where expert annotations are costly to produce, those are different uses of the available expertise. The archive supplies the material to search, while legal specialists supply test questions, relevance assignments, and answers against which the output can be checked.

The context also explains why the authors compare search methods before comparing answers. They want to know how reliably each search method can locate a case under the conditions of the test. A fluent response alone gives little insight into that stage. It could be based on the intended decision, or it could sound plausible while reflecting a different one. With a designated case for each question, the experiment can examine that distinction directly.

The paper’s account of earlier work starts with a problem familiar to information retrieval and search: the words used to ask for something can differ from the words in the relevant document. Legal terms may be ambiguous or have alternative forms, and an expression can have a specialized meaning in a judgment. The authors describe earlier legal search built around domain-specific indexing and query expansion. Indexing organizes what the system can search. Query expansion gives a question additional terms or formulations with which to find relevant records. Both address the relationship between the language of a request and the language in the index.

The related work also describes a move toward semantic retrieval, which ranks text by a learned representation of its content. The authors place this within legal case retrieval, where finding documents can itself be a research objective. Their review notes that legal systems differ by jurisdiction and that transferring conclusions between them presents difficulties. It also describes continued interest in conventional lexical search for legal texts. A precise term may recur in the wording of decisions and inquiries, and the paper points to the performance of BM25 in earlier legal retrieval benchmarks as a reason to include it. This is the backdrop for the comparison on Nepali decisions, where word choice could either identify a case effectively or make it difficult to find when the reader uses different wording.

The authors draw on surveys of legal question answering and broader legal language processing. Their account emphasizes the connection between available datasets, specialized vocabulary, and evaluation. A method can appear effective on one legal task because its data define the answers or the documents clearly, while another task may require interpretation across sources. The broader survey they cite discusses the range of tasks and datasets in legal natural language processing.

The paper also situates retrieval-augmented generation among attempts to make legal answers easier to verify. Its review describes work that brings judgment prediction and legal document retrieval together, as well as a system that represents relationships among legal citations alongside the text of cases. Those approaches make use of information beyond a direct match between a question and a document. The Nepali study begins with a simpler comparison. It asks which of several search methods can reliably supply a decision to an answer-writing procedure, with the evidence required to come from that decision.

Research on Vietnamese and Thai legal applications provides examples of related work in languages the authors characterize as under-resourced. The review also mentions a study that creates synthetic examples to support adaptation to legal text. These strands address the resource problem in different ways. One route creates examples for changing the system’s behavior through training. Another uses a corpus as an external source when answering. The authors chose the second route and frame their contribution as an initial benchmark for applying it to Nepali legal questions. Their priority claim concerns a systematic comparison in this particular setting. It is stated as the authors’ assessment of the prior work they found.

The method, step by step

From archive records to searchable cases

Imagine a reader asking whose behalf a contract was made on in a particular dispute. The question describes facts that may appear in the decision, but the answer may be a short conclusion buried within a much longer account. The system first uses the question to rank decisions or passages from them. If the best search result is a passage, it can identify the decision that contains it. The answer-writing component receives that decision, finds sentences that support a response, and then writes a short answer. When the supplied text gives it too little evidence, the intended response is a standard refusal in Nepali.

From archived decisions to a Nepali answer

The steps in order.

From archived decisions to a Nepali answerStep 1: Collect and clean decisions from the archive1. Collect and clean decisions from the archiveStep 2: Index complete cases and overlapping passages2. Index complete cases and overlapping passagesStep 3: Rank indexed text for the Nepali question3. Rank indexed text for the Nepali questionStep 4: Select one complete decision as context4. Select one complete decision as contextStep 5: Identify sentences that support an answer5. Identify sentences that support an answerStep 6: Write the answer or return the standard refusal6. Write the answer or return the standard refusal

The corpus comes from the Nepal Kanun Patrika digital archive, which the paper abbreviates as NKP. A Python script collected 10,320 documents representing individual cases, using BeautifulSoup to parse the text and fields from the archive’s HTML. The decisions date from 1992 AD to 2022 AD. The archive includes selected Supreme Court decisions involving criminal and civil matters, succession disputes, and writ proceedings. The paper’s examples indicate the range of material the authors collected, while the collection itself provides the text searched by each retrieval method.

Preparation for indexing included cleaning line breaks and excess whitespace, removing empty records, and applying Unicode Normalization Form Canonical Composition, or NFC. Unicode normalization gives equivalent character sequences a consistent representation. For a search method that compares terms directly, consistent encoding is part of making the same written term recognizable across the archive and the question. The authors still observed unwanted characters associated with irregularities in the digitization of historical records. Following preparation, the indexed collection comprised 10,265 unique documents.

The authors also divided the case texts into 110,626 overlapping passages. Each passage had a maximum length of 500 tokens. A token is a unit of text as handled by the system that reads it, and the relevant limit here is the number of such units an encoder accepts. The dense encoders used in the study all had an input limit of 512 tokens, so the authors selected a passage length below that ceiling. Consecutive passages had 10% overlap, allowing some text near a boundary to appear in both. The overlap is meant to preserve continuity if a useful expression or explanation falls close to the end of one passage.

Passage records retained information about the case they came from. The example record in the paper includes a document identifier, a passage identifier and position, a subject, a case number, a decision date, and the source, alongside the passage text. These fields illustrate the difference between the text being searched and the record needed to put a match back into context. A matching passage can serve as a locator for an entire decision. That relationship is especially important in this system because text segmentation is used to support retrieval and the final answer can depend on material beyond the boundaries of the matched segment.

The archive corpus and the evaluation questions play different roles. The decisions are indexed as searchable material. The questions provide instances on which the researchers can determine whether a known case was retrieved and whether an answer conveys the expected facts. The pipeline does not include a procedure that changes the answer generator’s parameters using Nepali case law. The paper reports that the curated Supreme Court collection, the scraping scripts, and the experimental code are publicly available.

Searching for shared words or similar meaning

The authors implement BM25 at both levels of the collection. BM25 is a sparse, lexical retrieval method. It scores an indexed text using the terms in a question and their occurrence patterns. A match on a term that helps distinguish documents can carry more information than a match on a very common term. The method also accounts for the length of the text being scored. In the study, BM25 Docs applies the scoring to whole decisions, and BM25 Chunks applies it to passages. Both use the BM25Retriever implementation in LangChain.

The two BM25 settings give the scoring method a different unit of text. On the whole-document index, occurrences throughout the decision contribute to its standing. That can help when useful terms occur in different parts of a case. On the passage index, closely related terms can have a stronger local presence because the text contains less material from the rest of the judgment. The arrangement is meant to test both possibilities without changing from lexical search to a different retrieval family. It also changes the size of the index, since the corpus has many more passages than decisions.

Dense retrieval assigns a numerical vector to each text. An encoder builds that vector from the text, with the intention that related content should have similar representations. At indexing time, the authors use each encoder to represent the passages and store the resulting vectors in a FAISS index. At question time, the same encoder represents the question in the corresponding vector space. The search then uses cosine similarity. In plain terms, the score reflects how closely the question vector and passage vector point in the same direction. A high score can arise from similarity in meaning even if the two texts use different words. It can also bring back a passage about a similar legal issue from a different case. The ranking step has to discriminate among such near alternatives. Semantic similarity

The dense implementations use multilingual-e5-large, multilingual-e5-base, and LaBSE. Each accepts up to 512 input tokens. Multilingual-e5-large represents text with 1024 dimensions, while multilingual-e5-base and LaBSE produce vectors of 768 dimensions. The dimension is the number of numerical coordinates in the vector used for comparison. The authors cite strong performance without task-specific training on earlier retrieval benchmarks as their reason for including the larger E5 encoder. They describe the base version as a more compact option with good prior multilingual retrieval performance. LaBSE provides a further multilingual alternative and is described as covering over 100 languages. The earlier work on the E5 variants is the Multilingual E5 technical report.

The vector index returns the highest-scoring passage candidates for a question. A passage’s identity links it to a case, and the generation stage uses the full case if it is selected. It helps to distinguish the actions involved. An encoder builds a representation, a search procedure ranks passages, and the pipeline uses a passage’s source to recover a decision. Finding a passage with terminology relevant to the question is an intermediate event. The record being evaluated as relevant is the designated decision, and the generator will ultimately need evidence for the particular answer within that decision.

Choosing a decision and finding evidence

For the generation experiment, the authors test direct selection using BM25 Docs and multilingual-e5-large. Whole-document BM25 returns decisions directly, so the first-ranked decision becomes the context. In the dense setting, the first-ranked result identifies a source case, and the entire decision is passed forward. The authors’ reason for using full decisions at this stage is that a legal answer can depend on material distributed across a judgment, even when a smaller passage is enough to locate it. The longer text may include the disposition, the reasoning behind it, and procedural details that would be easy to confuse if a fragment were read alone.

The Count method makes the selection using agreement across the search results. It pools the top 5 documents from each of BM25 Docs, BM25 Chunks, and multilingual-e5-large. It chooses the case that appears most frequently in that pool. The underlying idea is that different retrieval methods might make different errors, so a case appearing across their results might be a good candidate. The rule expresses agreement through occurrence counts. The paper gives no tie-breaking procedure and does not describe a further comparison of the search scores across methods. After the decision is chosen, the same passage-to-document principle applies. The generator is asked to use one complete decision as its context.

All generation settings use the same basic prompting procedure. The first stage asks the system to identify sentences from the case that support an answer, preserving their original wording in the evidence. The second stage asks it to compose an answer supported by those sentences. Where the decision offers insufficient evidence, the prompt directs it to return a fixed Nepali fallback. The procedure gives the system a way to signal that the selected text cannot support an answer. A refusal can therefore be a consequence of retrieval failure, although the same response can arise if the decision is correct and the system fails to recognize the relevant material.

The appendix also gives the format expected of an answer. The prompt calls for formal Nepali in Devanagari, preservation of legal terminology, a length of 1–3 sentences, and at least one exact phrase from the case. It requests plain text. These are instructions for the output and help explain the authors’ preference for a brief answer close to the source wording. The shared phrase is a limited check on that connection. Groundedness still requires examining all factual claims, including those in any sentence that contains a matching phrase. The authors relate evidence-sensitive refusal to earlier work on teaching a system to express uncertainty, including R-Tuning.

The generator is OpenAI o3. The authors use a temperature of 0.5, top-p of 1.0, and a maximum output of 2048 tokens. Temperature affects how sharply the system favors likely wording. Top-p governs which possible continuations are eligible based on their cumulative probability. The token limit caps the permitted output, while the prompt separately specifies the much shorter format desired for an answer. These settings are shared across the context-selection conditions. The candidate decision and its contents are what change when the answer procedure is run with a different retriever.

The contract example in the paper illustrates what this procedure is trying to preserve. The question asks on whose behalf a contract was made, mentioning that the principal was in office and that the school’s seal appeared. The reference explains that the Supreme Court treated the agreement as having been made on behalf of the school. The generated response from the whole-document BM25 condition gives that conclusion and retains the connection to the principal and seal. The example shows how a short answer can convey both the institutional party and the details that support the finding. A search match for the principal or a reference to a contract would be only a starting point for establishing what the court concluded.

Defining a correct search result

Each evaluation question has a single designated case. This controls what the retrieval measures mean. Precision@1 records whether the first-ranked result corresponds to that case, averaged across the questions. Hit@k records whether the case is present anywhere up to the chosen cutoff. Mean reciprocal rank at that cutoff, written MRR@k, also rewards a correct result appearing early. It uses the reciprocal of the rank of the first relevant result for each question. Questions without a hit by the cutoff contribute nothing to that mean. As a consequence, a list with a late hit can improve the hit rate without improving reciprocal rank as much as a first-place result would.

The paper gives an explicit bound on ordinary precision at a cutoff under this design.

Precision@k ≤ 1/k

Precision@k is the fraction of the first k positions occupied by relevant results under the paper’s single-document relevance setup. The at sign indicates the ranking cutoff, k is the number of positions considered, and the inequality sign means that the value on the left can be no larger than the value on the right. The numerator 1 represents the single relevant case, and the slash denotes division. If that case is found within the cutoff, it is the only designated relevant document available to earn credit. If it is absent, there is no relevant document in the list.

The authors leave out Precision@k beyond the first result because its value in this setup is limited by the cutoff itself. They also explain that recall at a cutoff would duplicate the hit rate. The fraction of all relevant cases recovered is determined by whether the sole designated case appears. At the first position, the hit and reciprocal-rank measures duplicate Precision@1 as well. The study tests cutoffs of 1, 3, 5, 10, 15, and 20. It also times retrieval in seconds so that a ranking improvement can be considered alongside the cost of finding the result.

Checking answers against evidence and against a reference

The automated evaluation uses Gemini 2.5 Pro for two separate judgments. In the groundedness evaluation, the judge reads the retrieved case and the generated answer. It identifies the factual claims and checks whether the case directly supports each of them. The instructions restrict it to the case text and require support to be explicit. An answer passes only if all its factual claims can be verified in the supplied context. That rule makes groundedness a property of the relationship between an answer and the selected decision. The same statement may be supported by one decision and unsupported by another.

The truthfulness judgment uses the expert-curated reference answer as its comparison. The judge checks whether the generated answer conveys the same essential legal facts. Wording can differ while preserving the relevant meaning. A contradiction or a factual error causes failure, and the study’s description also treats missing key details as a reason to fail. The appendix assigns the fallback response a failing truthfulness score. In both automated checks the requested decision is binary. This keeps the grading focused on whether an answer passes the stated criterion, while leaving the severity of different failures outside the score.

The two checks answer different questions about the end-to-end system. A case selected in error may support a statement that is beside the point for the intended question. Such a statement can fare differently under a check against the retrieved context and a check against the reference. Conversely, a response could express the reference fact while introducing unsupported material. The experimental separation makes it possible to discuss evidential support and factual agreement without assuming that one entails the other.

The study also incorporates human evaluation. The authors describe clarity, accuracy, and usefulness as concerns for human reviewers, and they present a human truthfulness result for the strongest generation setting. This gives the automated grades a comparison based on human judgment in a task where the relevance of a qualification or the completeness of a legal statement can require interpretation. The reported human truthfulness figure should be read as a measure alongside the two automated checks. The paper discusses similarities and differences in their judgments without providing a detailed breakdown of those differences by type of answer.

Experiments and results

What the test questions ask

Legal scholars curated 100 questions under the supervision of professors at Kathmandu University School of Law. The authors gave priority to legal correctness and the accuracy of the question-to-case assignments. The resulting set uses questions that are verifiable against the selected cases. In retrieval, a case either receives credit as the designated match or does not. In generation, the answer can be compared with the curated reference. The test thus samples questions for which an expert could specify a source and expected legal facts before seeing the system’s response.

The authors classify 79% of the 100 questions as objective. Within this category, 87% seek particular facts, definitions, or provisions, and 13% ask for identification of parties. They classify the remaining 21% of the test questions as subjective. Within that category, 58% concern legal procedure or reasoning, and 42% concern the rationale for judicial decisions. The subjective category still uses the single-case design. A request to explain the reasoning in a specific judgment can call for more interpretation than identifying a party while remaining answerable from one decision.

Those proportions describe the type of work the experiment weights most heavily. Most questions ask for something specific enough to locate and compare with a reference. Questions about procedure and rationale broaden the task, but the reported aggregate combines them with the larger factual category. A system that retrieves cases effectively when a question names a provision or repeats a distinctive expression can consequently make a strong showing in the overall results. The experiment does not give separate scores for those query types, so the breakdown describes the test rather than identifying the questions on which each method succeeds.

Ranking the intended case

At the first position, BM25 Chunks led the comparison with Precision@1 of 0.91 on the 100 curated queries. BM25 Docs achieved 0.88. Multilingual-e5-large was the strongest dense method at 0.75, while multilingual-e5-base achieved 0.38 and LaBSE ranked last. This is the result most closely aligned with direct context selection, because that generation setting takes the case indicated by the first result. It also shows how a result reported as the share of first-position successes differs from performance measured across a shortlist.

First-ranked retrieval on the 100 curated Nepali legal queries

Passage-level BM25 places the intended case first most often among the settings shown.

First-ranked retrieval on the 100 curated Nepali legal queriesBM25 Chunks (this paper): 0.91BM25 Chunks (this paper)0.91BM25 Docs: 0.88BM25 Docs0.88Multilingual-e5-large: 0.75Multilingual-e5-large0.75Multilingual-e5-base: 0.38Multilingual-e5-base0.38
The numbers
System or settingPrecision@1
BM25 Chunks (this paper)0.91
BM25 Docs0.88
Multilingual-e5-large0.75
Multilingual-e5-base0.38

The picture changes slightly when success means finding the case anywhere near the top. BM25 Docs has Hit@3 of 0.95 and Hit@5 of 0.96. Those are the highest hit rates reported for the displayed cutoffs, even though BM25 Chunks leads at the first position. Multilingual-e5-large reaches Hit@3 of 0.78 and Hit@5 of 0.80. Multilingual-e5-base records 0.45 and 0.50 for those respective cutoffs, while LaBSE records 0.28 and 0.31. These measures distinguish two possible uses of the retrieval system. A reader or a later selection stage can benefit from a reliable shortlist, while a system that only opens the leading case depends on first-position success.

Mean reciprocal rank gives another way to read the rankings. At MRR@3, BM25 Chunks scores 0.920, BM25 Docs 0.913, and multilingual-e5-large 0.762. At MRR@5, the same settings score 0.923, 0.916, and 0.766, respectively. The two other dense settings also have lower reciprocal ranks. Multilingual-e5-base records 0.410 at MRR@3 and 0.422 at MRR@5. LaBSE records 0.245 and 0.252. Whole-document BM25 finds the designated case within the shortlist very often, and passage-level BM25 gives slightly more weight to early hits through its stronger first-position result. The agreement between first-position performance and reciprocal rank suggests that the sparse results generally placed their successful matches early.

The authors ran retrieval at cutoffs of 10, 15, and 20 as well as the smaller cutoffs. They omit the larger cutoffs from the results table because they report little improvement there. On this test, expanding the candidate list past the earliest results did little to change the picture of which methods found the target. The paper describes this as saturation. The observation concerns this collection of targeted queries and the retrievers tested on it. It tells the reader why the authors focus on the head of the ranking and why they consider taking the first decision a practical procedure for generation.

The average-time table reports 1.2003 seconds per query for BM25 Chunks and 0.1042 seconds for BM25 Docs. Multilingual-e5-large takes 0.0681 seconds per query in the same table. The two fastest entries are multilingual-e5-base at 0.0136 seconds and LaBSE at 0.0131 seconds. The ranking by speed differs sharply from the ranking by first-position accuracy. The quickest methods also have the weakest retrieval scores. The stronger whole-document BM25 and multilingual-e5-large settings occupy the middle ground in time, while the leading first-position retriever requires the longest search.

Average retrieval time per query on the curated Nepali legal test

Whole-document BM25 searches much faster than passage-level BM25 in this experiment.

Average retrieval time per query on the curated Nepali legal testBM25 Docs (this paper): 0.1042BM25 Docs (this paper)0.1042BM25 Chunks: 1.2003BM25 Chunks1.2003Multilingual-e5-large: 0.0681Multilingual-e5-large0.0681Multilingual-e5-base: 0.0136Multilingual-e5-base0.0136LaBSE: 0.0131LaBSE0.0131
The numbers
System or settingseconds per query
BM25 Docs (this paper)0.1042
BM25 Chunks1.2003
Multilingual-e5-large0.0681
Multilingual-e5-base0.0136
LaBSE0.0131

Whole-document BM25 is marked in the latency chart because it was the sparse method selected to supply context directly in the generation experiment. The paper connects the higher cost of passage-level BM25 to the greater number of indexed entries. The whole-document search operates over 10,265 records, while the passage search operates over 110,626. This explanation is consistent with the direction of the measured difference. The exact runtimes characterize the implementations used in the study. They measure retrieval and leave out the work of writing an answer and applying the evaluation checks.

The results prose and the timing table give different numbers for the two quickest settings. The prose describes multilingual-e5-base and LaBSE at 0.04 seconds per query, while the individual values in the table are 0.0136 and 0.0131 seconds. The chart uses the values from the table, which supplies a separate average for each setting. Both accounts put the same methods at the fast end of the comparison. The largest difference relevant to the authors’ choice is between the two BM25 indexes, where the higher first-position precision of the passage index comes with a substantial increase in retrieval time.

The authors selected two standalone retrievers for generation on that basis. Whole-document BM25 offered high first-position precision and strong coverage near the top of its ranking, together with lower latency than passage-level BM25. Multilingual-e5-large gave a comparison with the most accurate dense method and searched faster than whole-document BM25 in the timing table. Passage-level BM25 contributed candidates to the Count method. Its ranking was never used as the sole context-selection rule in a reported generation condition, so its retrieval score has no directly corresponding answer-quality score in the experiment.

Answer coverage, support, and factual agreement

In the answer experiment, the same generation procedure is applied to a held-out set of 100 legal questions. The study reports successful answer generation as well as the quality checks. Whole-document BM25 yields 92 successful answers out of 100. The Count method yields 78 out of 100. Here success refers to producing an answer in the evidence-dependent pipeline, whose prompts allow a fallback where evidence is insufficient. The figure is a measure of answer coverage. Whether the response agrees with the reference or is supported in full by its case is dealt with separately.

Under the automated evaluations, whole-document BM25 records 85% truthfulness and 74% groundedness. The Count condition records 72% truthfulness and 61% groundedness. The Count method therefore trails in both the reference comparison and the evidence check, as well as returning answers less often. The paper reports that whole-document BM25 also performed better overall than multilingual-e5-large in generation. Its description of human review likewise places whole-document BM25 ahead of the dense and Count conditions on truthfulness. The human truthfulness figure reported for whole-document BM25 is 84%.

Automated truthfulness on the 100-question Nepali legal generation test

Answers produced with whole-document BM25 agree with the reference more often than answers produced with the Count method.

Automated truthfulness on the 100-question Nepali legal generation testCount: 72Count72BM25 Docs (this paper): 85BM25 Docs (this paper)85
The numbers
System or settingtruthfulness %
Count72
BM25 Docs (this paper)85

The truthfulness and groundedness percentages should be read with their respective comparison standards in view. The truthfulness judge is checking whether the answer expresses the core facts in a particular expert answer, with room for wording differences. The groundedness judge requires direct support in the selected text for every factual claim it identifies. The lower groundedness figure in the whole-document BM25 setting is consistent with the possibility that an answer gets the main point right while including something whose support is unclear. It could also reflect other combinations of successes and failures. The paper does not supply paired judgments that would identify how often particular answers passed one test and failed the other.

The same distinction applies to the relationship between search and answer coverage. A correct case at the head of the search results gives the generator a chance to find the right source. A refusal can still occur if that search result contains the answer in a form the generator fails to recognize. An answer can also be produced from a case that ranks well but is different from the designated one. The study’s headline figures describe these stages separately. They show whole-document BM25 doing well on both retrieval and generation among the conditions assessed, without allowing individual answer failures to be attributed to retrieval or generation from the aggregate scores alone.

The automated truthfulness result of 85% and the human result of 84% for whole-document BM25 are close at the aggregate level. The authors also say that both evaluations identify more truthfulness errors for multilingual-e5-large and Count. This is evidence that the broad preference for whole-document BM25 is shared by the two evaluation approaches. The scores do not provide a measure of item-by-item agreement. Human and automated judges can reach similar overall rates while differing over particular cases, especially where a response states the conclusion accurately but leaves open whether a qualification needed to be included.

What the ablations show

What changes when the indexed unit changes

The paper reports no formal component ablation of the answer pipeline, but it offers controlled retrieval comparisons, a cutoff analysis, and an answer experiment that changes how the context is selected. The closest comparison to a component ablation is the use of the same BM25 approach on different representations of the archive. Both settings search the same underlying collection with the same retrieval family. Whole-document BM25 scores decisions, while passage-level BM25 scores overlapping segments. The comparison shows that the segment index can promote the intended case to the first position more reliably, whereas the whole-document index remains highly effective when the shortlist counts and comes at a lower search cost.

There are two distinct consequences of splitting the decisions. It changes which words occur together in an indexed item, and it changes the number of items to score. A passage can emphasize the terms in a localized account of an event or finding. A complete decision can collect clues spread across that account and the remainder of the judgment. The reported timings and rankings show the combined effect of those changes. The experiment varies the indexing unit as a package. It does not separate the benefits of local word matches from the effects of overlap, the passage-length limit, or the number of indexed units.

The cutoff analysis places this comparison in the context of the downstream selection rule. As the cutoff moves beyond the first result, the whole-document method retrieves enough additional correct cases to lead the reported hit rates. The advantage of passage-level BM25 remains in reciprocal rank and first-position precision. In a pipeline built to use the first case, those rank-sensitive measures are especially relevant. In a pipeline that can examine more than one candidate before choosing, the shortlist figures suggest a different opportunity. The study tested one way of using several lists through Count. It did not rerank the candidates by examining how well each case answered the question.

What can be inferred about word matching

The comparison with dense retrieval covers a genuine choice among retrieval methods as implemented for the study. Passage-level BM25 and the dense systems search passages derived from the same decisions. The sparse method led, and even BM25 on complete decisions outperformed each tested dense system on first-position precision. The authors interpret this pattern in light of Nepali legal writing and the construction of the test. They describe the case texts as formulaic, with specific expressions tending to recur in a relatively stable form. On a question that names a fact or invokes a particular legal term, lexical overlap can be a discriminating signal.

The interpretation connects the observed result to a plausible property of the data. The experiment does not manipulate how much a question borrows the case’s wording or measure scores separately for paraphrased questions. It therefore leaves the mechanism open. A lexical system may have benefited from distinctive terms, and the multilingual encoders may have had trouble distinguishing decisions that share a subject. The authors also propose that the dense systems would benefit from adaptation to Nepali legal text. Since the study uses the existing encoders without such adaptation, its numbers establish the performance of those configurations. The experiment provides no direct estimate of the benefit domain adaptation would bring.

Within the dense comparison, multilingual-e5-large beats multilingual-e5-base and LaBSE on the displayed retrieval measures. The authors point to architectural and capacity differences. They describe the large E5 version as having 24 layers and 570 M parameters. The other dense encoders have 12 layers, and the parameter counts reported for multilingual-e5-base and LaBSE are 278 and 471 M, respectively. Embedding dimensions differ as well. These features vary together across the tested systems. The result identifies the stronger ready-to-use dense option in this experiment, and the architectural comparison supplies possible explanations rather than evidence for an independent effect of depth, parameter count, or vector size.

What the context-selection experiment isolates

The generation comparison keeps the answering procedure in place and changes how the complete decision is chosen. Whole-document BM25 selects the first decision from a lexical ranking. Multilingual-e5-large supplies the case indicated by its first-ranked match. Count uses agreement across several lists. With the same evidence-first prompt available in all conditions, the test can show whether a different source-selection strategy goes with different answer outcomes. Whole-document BM25 leads on the reported coverage and quality measures. This supports the paper’s account of retrieval as an important contributor to answer performance in the tested setup.

Count tests a particular way of combining retrieval signals. It rewards repeated appearance in the candidate lists. A decision with a distinctive match in one list can lose under that rule to a decision appearing more often across the pooled results. The method’s lower performance shows that popularity across these rankings did not improve context selection for this generation procedure. The rule does not assess whether the source can supply the precise answer or allow a highly ranked match to gain extra credit from its position. A combination using scores, ranks, or an explicit assessment of the evidence would ask a different experimental question.

Several other design choices remain fixed throughout generation. The paper attributes some of its performance to extracting evidence before answering, using the Nepali prompt, and allowing a refusal. The design applies those features everywhere. There is no comparison that removes evidence extraction, disables refusal, substitutes another prompt language, or changes full decisions to passage-only context while holding retrieval fixed. The paper can describe the behavior intended by these choices and report outcomes under the combined procedure. It cannot assign a measured share of the performance to any of them individually. The BM25 Chunks retrieval result likewise leaves its standalone effect on generation open, since its direct selection rule was excluded on latency grounds.

Limitations

Limits identified by the authors

The authors identify the 100 expert-annotated questions as a limit on statistical generalization. The benchmark is deliberately curated so that a question can be verified and linked to a particular case. Producing such questions requires legal expertise, and the authors emphasize the work involved in adding more. The design yields clear relevance assignments and allows a meaningful reference answer. A larger and more varied set could test how stable the ordering of methods is when the benchmark includes different wording, legal topics, and kinds of answers.

The collection has a separate limit. All indexed decisions come from NKP, which the authors say may not represent the entire Nepali legal domain. Its coverage supports a study of selected Supreme Court case law. Questions for which the answer lies in other types of material, or in decisions outside the archive, would pose a different retrieval problem. The archive’s uneven digitization also leaves artifacts in some texts after cleaning. The paper observes that problem without quantifying how much it affects the rankings or the generation scores.

The authors discuss subjectivity in human evaluation and differences between human and automated judgments. A reviewer may interpret the scope of a question or the importance of a missing detail differently from another reviewer. The paper mentions clarity, accuracy, and usefulness as criteria that can bring structure to such assessments. It also proposes expanding the case and question collections and exploring hybrid retrieval and reranking. These are plans to extend the scope and quality of evaluation. The assessed hybrid-like condition in this paper is the narrower Count rule.

Limits of the retrieval setup

The benchmark gives one case credit for each question. This is appropriate for a question constructed around a specific decision. It leaves open how a system would perform where several decisions are relevant or where an answer depends on reconciling several sources. In the benchmark, a different case about the same issue does not satisfy the designated relevance criterion. For a broader inquiry, that case might supply part of a useful answer. The difference is important when reading the hit metrics, which summarize success under the available relevance labels.

The dominance of factual questions also limits what can be said about the role of legal terminology. A test built around verifiable facts in designated cases may offer more distinctive lexical cues than questions posed without that design. The paper’s aggregate results do not show how well the rankings hold up when a question uses broad everyday descriptions or wording that departs substantially from the case. Even within the curated test, the publication does not break retrieval results down into the objective and subjective categories. The discussion of formulaic writing and exact terms is therefore an interpretation of the overall result.

The timing data are specific to the implementations used for this benchmark. The passage and whole-document conditions differ in index size and the way each text is represented during search. The dense settings use their own encoding and search procedure. The study offers average retrieval latency for the implementations but leaves out a systematic account of how those costs change as the archive grows or the search infrastructure changes. The reported comparison shows why the authors chose whole-document BM25 for their generation experiment. It gives a limited basis for extrapolating the runtime tradeoff to another implementation.

The account of passage retrieval also leaves some implementation details unspecified. Several highly ranked passages could come from the same decision. That issue matters both when a passage ranking is converted into a list of cases and when the Count method pools documents across retrievers. The paper does not explain in detail how duplicate case appearances are handled during ranking or how a tie in the Count rule is resolved. These details could affect which case occupies a particular position or wins the pooled selection. The broad experimental setup is clear, while those aspects of the reported comparison cannot be reconstructed from the method description alone.

Limits of the answer scores

The same annotated references help make truthfulness assessable, but truthfulness has a narrow operational meaning here. It measures agreement with the key legal facts in the curated answer. The groundedness rating uses the retrieved decision as its source and checks explicit support. Together these measures provide evidence about factual agreement and evidential support within the experiment. They provide limited evidence about how a reader would use the answer or whether the same approach can address open-ended requests that require evaluating legal arguments or connecting authorities.

Refusal is also part of what the reported scores measure. The truthfulness prompt explicitly marks the standard fallback as a failure. Under that rule, a system that declines because the selected case contains insufficient information loses credit on truthfulness for the test, even when the refusal follows the generation instructions. The answer-generation rate helps describe this aspect of behavior, since it records how frequently an answer is produced. The paper does not give a cross-tabulation that shows which refusals follow wrong retrieval, which follow missed evidence in a correctly retrieved case, and which might reflect uncertainty about how to respond. That limits the diagnosis possible from the public scores.

The authors describe the evidence-first prompt as reducing fabrication and report observing an absence of fabricated answers. This observation does not provide a separate measured fabrication rate or isolate the effect of the prompt. The groundedness evaluation records whether every claim has explicit support, so an answer can fail it through a missing textual basis even if the claim sounds plausible or agrees with part of a reference. Conversely, removing unsupported claims would not on its own ensure that the answer contains every fact required by the question. The paper’s measured outcomes are best understood through the stated checking rules, which cover overlapping aspects of answer quality.

The human assessment adds an independent perspective on truthfulness, but the aggregate comparison leaves questions unanswered about individual judgments. The paper does not show how often the two kinds of evaluator disagree over the same answer, what types of disagreements occur most frequently, or whether human reviewers agree with one another on borderline responses. Similar overall truthfulness rates for whole-document BM25 support the same broad reading of that condition. They do not establish that an automated judge reproduces human legal judgment across the test, or that equivalent agreement would hold on a more interpretive set of questions.

Finally, the study assesses a shared answering procedure with selected retrieval settings. There is no standalone generation score for BM25 Chunks, in spite of its first-position retrieval lead, and there is no generation comparison that changes the amount of source text the system reads. A higher likelihood of supplying the designated case can plausibly matter for an answer, while the ability to extract and express the required fact is a separate part of the causal chain. The paper documents the performance of the settings that were actually tested. It leaves open whether an alternative could trade higher retrieval cost for better answers or retain more evidence while supplying less than a full decision.

What came after

There is no documented later study to trace from this work. The paper closes by proposing a larger expert-curated benchmark, broader data coverage, and experiments with hybrid retrieval and reranking. Those directions follow from specific choices in the baseline. A larger benchmark could test whether the strong lexical results hold across more varied requests. Reranking would let the system inspect several plausible cases before selecting evidence, addressing a different question from whether the decision appears near the top of a retrieval list. The published experiments establish the starting measurements for those comparisons.

Cite

Cite as Samir Wagle, Abiral Adhikari, Reewaj Khanal, Batsal Bhandari, Prashant Manandhar, Praveen Acharya and Bal Krishna Bal. 2026. Retrieval Augmented Generation Framework for the Nepali Legal Domain Question Answering. arXiv:2606.07523.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2606.07523 · arXiv 2606.07523

@misc{wagle2026retrieval,
  title = {{Retrieval Augmented Generation Framework for the Nepali Legal Domain Question Answering}},
  author = {Samir Wagle, Abiral Adhikari, Reewaj Khanal, Batsal Bhandari, Prashant Manandhar, Praveen Acharya and Bal Krishna Bal},
  year = {2026},
  doi = {10.48550/arxiv.2606.07523},
  eprint = {2606.07523},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2606.07523}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/wagle-2026-retrieval-augmented-generation-framework-nepali/