A Markov-Decision Formalization of Context Selection and a Hybrid Text–Graph Knowledge Model for Retrieval-Augmented Legal Question Answering
Keywords:
Retrieval-Augmented Generation, Markov Decision Process, Knowledge GraphsAbstract
Retrieval-Augmented Generation (RAG) couples a large language model with an external knowledge store, yet the quality of its answers is dominated by an upstream, under-formalized step: which context to retrieve. This paper addresses two gaps. First, we give a precise formalization of relevant-context selection as a constrained informationmaximization problem and reduce it to a Markov Decision Process (MDP), passing through a non-observable context-utility functional, a computable surrogate that combines relevance, diversity and graph coherence, and an analysis of its diminishing-returns structure that justifies both greedy and learned policies. Second, we propose a hybrid text–graph model of documented information that unifies a lexical, a vector and a graph level over a heterogeneous text-attributed graph, together with the database-structuring principles that make the three levels jointly searchable. We instantiate the model on the national legislation database of the Republic of Uzbekistan, building a typed three-level graph (documents, regulated entities, defined concepts) of 207 nodes and 1,718 typed edges directly from act cross-references and definition articles.
References
Downloads
Published
Issue
Section
License

This work is licensed under a Creative Commons Attribution 4.0 International License.
You are free to:
- Share — copy and redistribute the material in any medium or format for any purpose, even commercially.
- Adapt — remix, transform, and build upon the material for any purpose, even commercially.
- The licensor cannot revoke these freedoms as long as you follow the license terms.
Under the following terms:
- Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
Notices:
You do not have to comply with the license for elements of the material in the public domain or where your use is permitted by an applicable exception or limitation.
No warranties are given. The license may not give you all of the permissions necessary for your intended use. For example, other rights such as publicity, privacy, or moral rights may limit how you use the material.






