RAG -Enhanced Neural Machine Translation of A ncient E gyptian Text: A Case Study of THOTH AI (2025)

Abstract: This paper demonstrates how Retrieval-Augmented Generation (RAG) significantly improves translation accuracy for Middle Egyptian, a historically rich but low-resource language. We integrate a vectorized Coptic-Egyptian lexicon and morphological database into a specialized tool called THOTH AI. By supplying domain-specific linguistic knowledge to Large Language Models (LLMs) like Claude 3.5 Sonnet, our system yields translations that are more contextually grounded and semantically precise. We compare THOTH AI against various mainstream models, including Gemini 2.0, DeepSeek R1, and GPT variants, evaluating performance with BLEU, SacreBLEU, METEOR, ROUGE, and chrF. Experimental results on the coronation decree of Thutmose I (18th Dynasty) show that THOTH AI’s RAG approach provides the most accurate translations, highlighting the critical value of domain knowledge in natural language processing for ancient, specialized corpora. Furthermore, we discuss how our method benefits e-learning, digital humanities, and language revitalization efforts, bridging the gap between purely data-driven approaches and expert-driven resources in historical linguistics.

## introduction ancient egyptian is an afro-asiatic language dating back five millennia, encompassing multiple historical phases-old egyptian, middle egyptian, late egyptian, demotic, and coptic-as well as a complex set of writing systems (hieroglyphic, hieratic, demotic, and the greek-based coptic script). despite its linguistic and cultural importance, it remains a low-resource language for natural language processing (nlp) tasks, primarily due to limited digitized parallel corpora and the intricate orthographic and grammatical features of its scripts. while large-scale neural networks and large language models (llms) have revolutionized machine translation in high-resource languages, these models tend to underperform when domain-specific data are scarce. retrieval-augmented generation (rag) is an emerging strategy that mitigates data scarcity by pairing llms with external knowledge repositories. rather than relying solely on the implicit knowledge encoded in a model's parameters, rag injects relevant external information-such as specialized lexicons, dictionaries, and grammatical annotations-directly into the model's prompt. in this way, the model's generative process is "grounded" in domain knowledge it might otherwise lack. our research aims to show how rag-based methods can achieve substantial improvements in translating middle egyptian texts, focusing on the coronation decree of the 18th dynasty pharaoh thutmose i. we developed thoth ai, an interactive translation system that unifies claude 3.5 sonnet with a vectorized lexicon curated from the comprehensive coptic lexicon @xcite , produced by the thesaurus linguae aegyptiae project, the coptic scriptorium project @xcite , and the kellia project. the system leverages the dify platform's default vectorizer to embed specialized lexical data, enabling instant retrieval of morphological, semantic, and etymological details across ancient egyptian's historical stages. thoth ai then passes these retrieved entries to claude 3.5 sonnet for a ragenhanced translation. to measure effectiveness, we compare thoth ai's performance against state-of-the-art models such as gemini 2.0, deepseek r1, and gpt variants (gpt 4o, gpt o1 pro, gpt o3-mini-high). consis-tent improvements in bleu, sacrebleu, me-teor, rouge, and chrf scores underscore the benefits of domain-specific retrieval. finally, we discuss how this rag-based approach, when integrated with ocr tools for handling hieratic or hieroglyphic script images, can transform e-learning by automatically offering morphological insights and dictionary lookups to students. moreover, we highlight its value for digital humanities and copticlanguage revival, showcasing a method that is equally useful for academically trained egyptologists and broader communities seeking to engage with egypt's ancient legacy. ## conclusion adding a retrieval layer to mainstream large language models has significantly boosted the quality of middle egyptian translations. our system, thoth ai, pairs claude 3.5 sonnet with a vectorized coptic-egyptian lexicon and morphological database. on a classical text from the reign of thutmose i, thoth ai's translations consistently outperformed standard llm approaches, as demonstrated by higher bleu, meteor, rouge, and chrf scores. these improvements highlight how crucial domain-specific knowledge is for deciphering the archaic vocabulary and grammatical forms inherent to ancient egyptian. the broader implications of this research extend to digital humanities, where scholars face extensive corpora of under-digitized ancient texts, as well as to e-learning, where students can benefit from automatic dictionary lookups and morphological guidance. in addition, the approach offers insights into coptic revitalization, illustrating how bridging different historical stages of the same language can inform modern usage. overall, our study suggests that the synergy between rag and domain-specific lexical databases can substantially advance the machine translation of ancient, low-resource languages, transforming them from challenging realms of manual scholarship to more accessible domains of ai-assisted study.