Pragya: AI Semantic Retrieval for Sanskrit Verses
- Pragya is an AI-based semantic recommendation system for Sanskrit Subhāṣitas that retrieves verses based on meaning rather than literal keywords.
- It integrates IndicBERT embeddings, FAISS nearest-neighbor search, and a local Mistral LLM to provide transliterations, translations, and modern contextual explanations.
- Evaluation indicates enhanced retrieval precision, coverage, and user satisfaction compared to traditional keyword search, despite increased query latency.
Searching arXiv for the specified PRAGYA-related paper and closely related work to ground the article. Pragya is an AI-based semantic recommendation system for Sanskrit Subhāṣitas, presented as a retrieval-augmented generation framework that retrieves verses by meaning rather than literal keyword overlap and then renders them into accessible output through transliterations, translations, and contextual explanations. It is designed to address the underutilization of Subhāṣitas in the digital age, where linguistic complexity, sparse digital structure, and the mismatch between contemporary user intents and classical verse expression make ordinary search inadequate. The system is implemented as a fully local pipeline using IndicBERT/IndiBERT sentence embeddings, FAISS for nearest-neighbor retrieval, and a locally hosted Mistral LLM via Ollama; the paper positions it as the first attempt to combine embedding-based retrieval with retrieval-augmented generation specifically for Sanskrit Subhāṣitas (Raorane et al., 10 Jan 2026).
1. Problem formulation and design objective
Pragya addresses a specific information-retrieval problem in cultural heritage collections: users often seek a verse by theme, mood, or situational relevance rather than by a lexical string that already appears in the source text. The motivating examples in the paper include needs expressed as “hope,” “resilience,” “friendship,” or “courage.” Under ordinary keyword search, such queries may fail unless those exact words occur in the verse or its metadata. The paper therefore treats traditional keyword search as inadequate when the goal is not merely lookup, but meaningful recommendation and interpretation (Raorane et al., 10 Jan 2026).
The design objective is correspondingly twofold. First, the system should retrieve Subhāṣitas by semantic proximity to a natural-language query. Second, it should make the retrieved material understandable to readers who do not know Sanskrit. Pragya therefore combines a retriever and a generator: semantic search identifies candidate verses, and generation converts them into a human-friendly form. This makes the system not only an IR engine, but also an interpretive interface for compact ethical, emotional, and philosophical texts.
A common misconception about such systems is that they function as glorified dictionaries. Pragya is explicitly framed otherwise. Its purpose is not simple text lookup or literal translation, but recommendation by meaning and explanation in context. The paper repeatedly emphasizes that the target interaction is query-to-guidance rather than query-to-string-match.
2. Corpus curation and annotation structure
The proof-of-concept corpus is a curated CSV dataset of 200 Subhāṣitas, with each row containing the Sanskrit verse in Devanagari script, a Marathi translation, an English translation, and thematic or mood tags such as friendship, motivation, compassion, courage, or related categories. These tags serve two functions: they provide a lightweight supervised structure for evaluation, and they connect poetic content to user intents expressed in contemporary natural language (Raorane et al., 10 Jan 2026).
The paper notes an internal inconsistency in project history: an earlier constraint section refers to 150 verses, whereas the methodology and results sections consistently describe the working prototype as built on 200 curated verses. The paper therefore treats the 200-verse version as the operative dataset for the reported system. The corpus is intentionally small, and the authors characterize the system as a proof of concept rather than a production-scale recommender.
This small scale is methodologically significant. It implies that Pragya is demonstrating feasibility rather than benchmarking saturation. A plausible implication is that the thematic tags function as both retrieval anchors and evaluation scaffolding in a setting where no established benchmark for Subhāṣita recommendation yet exists. The paper is explicit that the dataset is sufficient to demonstrate semantic retrieval over culturally meaningful text, but insufficient for claims of exhaustive thematic coverage.
3. Retrieval architecture and semantic indexing
Pragya is organized as a retrieval-augmented generation pipeline. The retrieval stage begins with preprocessing the curated verses, segmenting them into manageable chunks if necessary, and embedding them into a shared semantic vector space using IndicBERT sentence embeddings. The same embedding model is used at query time, so user queries and verses are represented in the same space, making similarity-based retrieval possible (Raorane et al., 10 Jan 2026).
The verse embeddings are indexed in FAISS, which provides efficient approximate nearest-neighbor search. At inference time, a natural-language query such as “teachings about friendship” or “guidance on courage” is embedded and compared against the indexed verse vectors. The system then returns the top- most semantically similar verses. The paper does not specify the exact distance formula, but it notes that FAISS is typically used with cosine similarity or inner product for sentence embeddings; conceptually, the retriever selects verses whose vector representations are closest to the query embedding in semantic space.
This retrieval layer is the core mechanism by which Pragya departs from literal search. It does not require direct lexical overlap between query and verse. Instead, it assumes that semantically proximate texts should occupy nearby positions in the embedding space. That assumption is standard in modern dense retrieval, but in this setting it is applied to Sanskrit wisdom literature, where thematic resonance may be more important than explicit token match.
The broader Sanskrit NLP context helps explain why this design is notable. A semantic annotation framework for the Ayurvedic text Bhavaprakāśanighaṇṭu argues that automatic knowledge-base construction is not yet reliable enough for Sanskrit because of heavy compounding, ambiguous morphology, difficult sentence boundary detection in verse, lack of robust co-reference resolution, and implicit semantic relations; it therefore relies on manual annotation and structured querying instead (Terdalkar et al., 2022). This suggests that Pragya’s embedding-based retrieval is operating in a linguistically challenging regime where full symbolic semantic normalization remains difficult.
4. Generative interpretation and user-facing output
Pragya becomes a true RAG system at the generation stage. The top- retrieved verses, together with the original user query, are passed to a locally hosted Mistral LLM running through Ollama. Mistral produces transliterations, translations, and contextual explanations intended to relate the retrieved verse to modern-life situations. The paper stresses that this is not merely literal translation: the generator is used to create concise, contemporary interpretations that preserve cultural meaning while making the verse usable for a broader audience (Raorane et al., 10 Jan 2026).
The user interface presents the output in three parts: the Sanskrit verse in Devanagari, a bilingual translation, and an AI-generated explanation. This tripartite presentation is central to the system’s accessibility. Readers who know Sanskrit can inspect the original verse directly, while non-Sanskrit readers can rely on translation and interpretive scaffolding. The interface supports English and Marathi input, and the proof-of-concept examples include queries such as “motivation for students” and “importance of truth.”
The paper also describes a lightweight interface with a “daily wisdom” style mobile display, indicating a practical orientation toward recurring access rather than one-off lookup. At the same time, the prototype includes a voice component whose output is described as robotic and lacking natural prosody, which the authors identify as a current engagement limitation rather than a solved modality.
In operational terms, the system’s generation layer performs cultural mediation. The retrieved verse remains the authoritative content unit, but the LLM supplies explanatory context that connects ancient poetic form to contemporary emotional or situational use.
5. Evaluation and empirical findings
The evaluation combines quantitative retrieval metrics with qualitative user judgments. One retrieval result reported as the main success indicator is that, in more than 85% of test cases, at least one of the top-3 retrieved verses matched the intended query theme. The paper also compares semantic retrieval against keyword search on four reported measures (Raorane et al., 10 Jan 2026).
| Measure | Keyword search | Pragya |
|---|---|---|
| Top-3 precision | 45% | 72% |
| Coverage | 60% | 82% |
| User satisfaction | 2.8/5 | 4.3/5 |
| Latency per query | 0.5 s | 1.2 s |
These results indicate a clear tradeoff. Pragya is slower than keyword matching, but it improves top-3 precision, coverage, and user satisfaction substantially. The paper interprets this as evidence that semantic retrieval better matches the way users formulate ethical or emotional information needs.
A second comparison examines Mistral-generated explanations against dictionary-style translations on a 1–5 scale. Pragya scores higher on clarity of meaning (3.4 vs. 2.5), cultural appropriateness (4.2 vs. 3.0), engagement (4.1 vs. 2.2), and overall score (4.4 vs. 2.6). This finding supports the paper’s claim that generation adds interpretive value beyond literal translation.
The user study is a small pilot involving five users. According to the reported findings, participants judged Pragya to be more accessible and more relevant than baseline search or dictionary translation. The generated explanations made verses easier to understand for non-Sanskrit speakers, and thematic retrieval increased the chance of finding a verse aligned with emotional or situational intent. The paper is careful, however, to note that the study is indicative rather than statistically definitive.
6. Limitations, significance, and projected extensions
The limitations are explicitly acknowledged. The dataset is small, which restricts thematic coverage and the diversity of semantic contexts. Sanskrit’s morphological richness, figurative language, and culturally specific metaphors can be difficult for embeddings to capture accurately. The system may miss context-dependent meanings, and generation latency can be noticeable on constrained local hardware. There is also no established benchmark for Subhāṣita recommendation, so evaluation depends heavily on expert judgment and small-scale user studies. The prototype voice component remains underdeveloped (Raorane et al., 10 Jan 2026).
Within those limits, the paper frames Pragya as a bridge between digital heritage and applied AI. Sanskrit Subhāṣitas are treated not simply as archival text, but as compact carriers of ethical, educational, and philosophical insight that can be surfaced in response to human-centered queries. This framing gives the system significance beyond retrieval engineering: it is presented as a culturally aware AI application for students, educators, and non-expert readers who may benefit from meaning-based access to classical literature.
The future directions proposed in the paper are concrete. They include expanding the dataset to thousands of verses from sources such as the Hitopadesha, Panchatantra, and Puranas; adding multilingual query support; improving speech input and output; conducting larger-scale evaluations; and embedding the system into educational or mobile heritage applications. These extensions would move Pragya from proof of concept toward a broader infrastructure for semantic access to Sanskrit wisdom literature.
Taken together, Pragya is best understood as a local RAG system specialized for classical Sanskrit wisdom: IndicBERT and FAISS provide meaning-based retrieval, Mistral produces accessible interpretive output, and the overall pipeline attempts to transform Subhāṣitas from difficult-to-search literary artifacts into semantically navigable, contextually explained recommendations.