From Text to Sound: Journey, Discoveries, and Research Questions at the Boundaries Between Technology, Epistemology, and the Study of Religions

Behind the Scenes of SacredTexts AI

Contribution to the Superseminar «Exploring the Frontier of Science with AI and the Role of Humanities» (March 9–11, 2026, Reggio Emilia), organized by RESILIENCE — European Research Infrastructure on Religious Studies and the University of Modena and Reggio Emilia, with the support of FSCIRE, ITSERR, and funding from the European Union (NextGenerationEU).

Francesco Mariano — Multimedia Artist & Lecturer in Sound Design and Interaction Design
Academy of Fine Arts, Macerata · G.B. Martini Conservatory, Bologna

Version 2.21.0

* Context and Project Genesis

I am not a theologian, a biblical scholar, a historian of religions, or a philologist. I am a musician, a composer of electroacoustic works, and a lecturer in creative technologies — Sound Design, Interaction Design, audiovisual programming — at Italian conservatories and academies of fine arts.

What I present here is the account of a journey born from the professional curiosity of an interaction designer who chose sacred texts as a testing ground for comparing different generalist artificial intelligence systems.

The two tools

SacredTexts AI and SacredSounds Radio Hub were born as a personal project developed in 2025 to explore and compare AI models. The two Progressive Web Applications (PWAs) were conceived as complementary tools: SacredTexts AI deconstructs and visualizes sacred texts, while SacredSounds Radio Hub gathers the living voices of religious traditions broadcast in real time by communities around the globe.

Following an invitation to the Superseminar “Exploring the Frontier of Science with AI and the Role of Humanities” (March 9–11, 2026, Reggio Emilia), organized by RESILIENCE — European Research Infrastructure on Religious Studies — and the University of Modena and Reggio Emilia, with the support of FSCIRE (Foundation for Religious Sciences), ITSERR, and funding from the European Union (NextGenerationEU), the applications have been enriched and this document gathers the journey, discoveries, and research questions that emerged from building the tools — from the perspective of an outsider to religious studies. The technical appendices at the end of the document detail the architecture, design choices, and code.

SacredTexts AI

Analysis of 48 sacred texts from 8 traditions with generative AI, thematic categorization (theology, ethics, mysticism, practice), interactive graph of conceptual connections, and a generative audio engine that transforms textual structures into soundscapes.

SacredSounds Radio Hub

Over 60 radio stations from 10 spiritual traditions, interactive map with station geolocation, Comparative Explorer AI for cross-tradition analysis, and documented color symbolism.

References: ITSERR/FSCIRE AI Models

Within the RESILIENCE infrastructure, ITSERR/FSCIRE research has produced a series of specialist AI models, fine-tuned on domain-specific corpora for religious studies. These models are designed to analyze individual linguistic and documentary domains in depth with scholarly accuracy.

Latin BERT (ITSERR fine-tuning)

Transformer model originally pre-trained on Latin corpora by Bamman & Burns (UC Berkeley, 2020), fine-tuned by ITSERR WP8 with contrastive learning on the Vulgate and Vetus Latina for semantic search in Latin biblical texts. Hugging Face ITSERR.

LaBERTa (ITSERR fine-tuning)

RoBERTa-based model created by Riemenschneider & Frank (University of Heidelberg, ACL 2023), trained on approximately 167 million tokens from the Corpus Corporum. Fine-tuned by ITSERR WP8 for semantic search and text classification in patristic Latin texts. Model on Hugging Face.

ConvNeXt for ex-votos

Convolutional neural network (ConvNeXt Base, 224×224) developed by ITSERR for automatic classification of ex-voto images, applied to iconographic analysis of the votive heritage. Model on Hugging Face.

EMAN & Digital Maktaba

EMAN (Embedding Methodology for Authentic Narrations): framework for mitigating GPT hallucinations in Islamic texts (Sahih al-Bukhari and Quran), presented at ICAART 2025. Digital Maktaba (WP5): digitization of over 73,000 Arabic-script volumes from the FSCIRE “La Pira” Library, using Qwen-2VL-72B and Google Vision AI.

Note on the AI model used

The models developed within ITSERR represent a contribution of great scientific value: they are tools built with academic rigour, trained on specific corpora and designed to answer precise research questions. The fine-tuning work on Latin biblical texts, the iconographic classification of ex-votos, the verification of Islamic sources are achievements that require specialist expertise and dedicated infrastructure.

This project has a different origin: it began as a personal experiment by an author with an artistic and multimedia background who, while not coming from the field of religious studies, wanted to explore the use of generalist AI models, turning the results into interactive visualisations. A project still under development, created for educational and outreach purposes ahead of the RESILIENCE Superseminar — although some design choices, such as the interactive components and the generative audio engine, inevitably bear the signature of the author’s artistic path.

The choice of Gemini as a generalist model is not an alternative to ITSERR’s specialist models, but responds to a different practical need: the necessity of operating simultaneously across languages, traditions and expressive forms that are very different from one another (texts, sounds, prayers, rituals), with real-time responses and using tools accessible without dedicated computing infrastructure.

These applications do not claim to replace specialist research. They are exploration and educational tools, still evolving, that seek to offer an interactive and multimodal gateway to the heritage of religious traditions.

I — Text as Computational Object

The questions that generated the tool

The project began as an exercise in comparing AI systems. As an interaction design lecturer, I was interested in how different large language models — GPT-4, Claude, Gemini — would respond to the same structured prompt when asked to perform a complex analytical task. I needed a domain challenging enough to reveal differences between models: one that required sensitivity to historical context, awareness of multiple linguistic and cultural layers, the ability to maintain structured output, and the management of material that pushes against the safety filters these systems impose.

Sacred texts proved to be an almost perfect stress test. A passage from Genesis contains Hebrew poetry, cosmological assertions, centuries of rabbinic interpretation, theological implications across three Abrahamic traditions, and an internal structure that resists simplification. Asking an AI to «analyze» such a text means asking it to navigate a space of extraordinary density, and the way different models navigate that space reveals their architectures, their training biases, and their implicit epistemologies.

The initial questions were therefore technical and comparative:

But while building the tool to answer these questions, new ones appeared — questions I could not have formulated without the tool itself. This, I believe, is the fundamental dynamic this seminar intends to examine.

The architecture in brief

SacredTexts AI is a progressive web application (PWA) that uses Google’s Gemini language models to analyze passages of sacred texts belonging to eight religious traditions. The analysis is visualized as an interactive graph with cinematic mode, where concepts, themes, and cross-references become visible animated spatial relationships. It includes a dual audio system: real audio samples specific to each tradition and a probabilistic algorithmic generator where dragging graph nodes modulates musical parameters in real time.

When a user submits a sacred text, Gemini decomposes it into a structured JSON object: a central node, thematic clusters, child concepts, keywords, cross-references, historical context across nine dimensions, confidence scores, and three epistemological research questions. The prompt governing this analysis is itself a carefully crafted artifact: 93 lines of instructions defining the AI’s role, its constraints, the output schema, and the epistemological posture it must adopt. (The complete prompt is documented in Appendix B.)

The prompt as hermeneutic tool

I want to dwell on the prompt, because I believe it is one of the most overlooked elements in the current discourse on AI and the humanities.

The system prompt I designed for the text analysis engine is not a simple instruction. It is a hermeneutic framework encoded in natural language. It assigns the AI a role («comparative religion scholar, expert historian, and information architect»), establishes epistemological rules («never invent concepts not present in the text», «provide in-depth historical context», «assign confidence scores to every assertion»), defines the output ontology (a graph structure with typed relationships), and sets constraints on granularity («quotations must be 10 words or fewer»).

Designing this prompt required me to make explicit decisions about what constitutes a valid analysis of a sacred text. This is an inherently epistemological act. What categories should the AI use to classify themes? I chose four: theology, ethics, mysticism, practice. This is a choice with consequences: it privileges certain readings over others, and any alternative categorization would produce a different graph topology.

The prompt, in other words, is not neutral infrastructure. It is an executable theory of reading. And every modification produces measurably different outputs. This means that prompt design for humanistic applications is not an engineering task — it is an academic one, requiring the same rigor we apply to the design of a research methodology.

II — Three Discoveries from Text

Working on SacredTexts AI as a person without training in religious studies produced a series of encounters I would not have had from within the discipline. I describe three, because each generates a research question of the type this seminar intends to identify.

1. Safety filters as implicit theology

In the early stages of development, I discovered that Google’s AI refused to analyze certain passages from the Quran, the Hebrew Bible, and the Vedas. The API returned a SAFETY flag and blocked the response. Passages describing divine punishments, wars, or severe judgments triggered the model’s harm prevention filters — specifically the categories «hate speech» and «harassment.»

At one level, this is a technical problem with a technical solution (the application includes an option to relax these filters for academic study). But at another level, it reveals something profound: the AI system carries with it an implicit judgment about which parts of sacred texts are «safe» and which are «dangerous.» This judgment was not formulated by theologians — it was formulated by engineers in California applying general-purpose content moderation rules to texts that have been the subject of commentary and interpretation for millennia.

When an AI classifies a passage as «hate speech,» it is performing an act of interpretation with theological, cultural, and political implications — yet it is an interpretation that passes as a neutral technical constraint. This discovery is not merely a problem for religious studies. It is a case study in the broader challenge of applying universal content moderation to culturally specific material.

Sacred texts, because they combine extreme cultural sensitivity with extreme interpretive complexity, are probably the hardest case. A solution that works for computational analysis of the Quran will work for legal proceedings, medical reports, and historical archives. In this sense, religious studies are not consumers of AI safety research — they are its drivers.

2. The graph as a new reading surface

When the AI’s analysis is rendered as an interactive graph — with nodes representing concepts, edges representing relationships, spatial proximity indicating thematic affinity — something unexpected happens. The visual topology of the graph itself becomes an object of interpretation.

A densely connected cluster suggests a passage with high internal coherence. A conceptual node positioned between two clusters, connected to both, suggests a bridging theme that the linear text does not make explicit. Cross-references between traditions, shown as colored lines traversing the graph, make visible a structure of relationships that exists in the AI’s analysis but would be difficult to perceive in a written comparative essay.

The graph is not a summary of the text. It is a spatial transposition of a particular reading of the text — the AI’s reading, governed by the hermeneutic framework of the prompt. But because it is spatial, it is also explorable: the user can zoom, pan, click nodes to see details, drag nodes to reorganize relationships. This interactivity transforms the reader from a consumer of analysis into an active explorer of an analytical space.

3. Research questions as recursive inquiry

Perhaps the most significant feature of the application: for every textual analysis, the AI is instructed to generate exactly three epistemological research questions. These are not summaries or comprehension questions. The prompt explicitly requires the identification of tensions, paradoxes, historiographic gaps, and non-obvious connections within the analyzed passage, formulated as open academic questions useful for further research.

What makes this mechanism powerful is its recursive nature. Every generated question can be fed back into the analysis engine as new input. The user clicks «Analyze this question,» and the AI produces a new graph, with its own structure, its own cross-references, and its own three new research questions. The process can be iterated indefinitely, creating a branching tree of inquiry that deepens with each cycle.

Concrete example

Analyzing Genesis 1:1-5, the AI might generate: «What is the relationship between the pre-existing tohu va-vohu and the creative act of bara — does the text imply a creation ex nihilo or an ordering of pre-existing chaos, and what are the historiographic implications of each reading?» This question, when reanalyzed, produces a graph focused on ancient Near Eastern cosmogonies, the parallel with the Enuma Elish, and the theological stakes of the creatio ex nihilo debate.

III — From Text to Sound: SacredSounds Radio Hub

Where SacredSounds comes from

SacredSounds Radio Hub was born from a question that presented itself while I was developing SacredTexts AI. Working with texts — deconstructing them into conceptual graphs, sonifying them through algorithmic generators — I became aware of an absence. Sacred texts, in the application, were analytical objects: textual fragments filtered through the computational mediation of AI. But religious traditions do not live only in texts. They live in voices, songs, recitations, liturgies transmitted in real time by communities scattered across the world.

If SacredTexts AI asks the question «how does a machine read a sacred text?», SacredSounds poses a complementary one: how can one build a listening space that fosters interreligious understanding without reducing the complexity of traditions to a catalog?

SacredTexts AI

48 sacred texts, 8 traditions. Generative sound (algorithms). Analysis, graphs, sonification — text as computational object.

SacredSounds Radio Hub

73 radio stations, 12 traditions. Real sound (living voices). Listening, map, AI comparison — voice as real-time experience.

Curation as epistemological act

Selecting 73 radio stations from 12 religious traditions is not a neutral act. Every choice of inclusion and exclusion is an interpretive decision. The disproportion in the number of stations available online reflects asymmetries of power, technological access, and media presence that have nothing to do with the theological relevance or spiritual depth of a tradition.

I tried to manage this disproportion with explicit criteria:

Curation is the sonic counterpart of the prompt: a design act that determines what the user will be able to experience, and what will remain excluded. Making one’s selection criteria visible is the first step toward being able to discuss them.

Three discoveries from sound

1. The asymmetry of online presence as cultural data

Christianity has 17 stations and the Bahá’í Faith has one. This disproportion is not the result of curation: it is a faithful reflection of the online radio presence of different traditions. The infrastructure of audio streaming is a product of the technological West, and religious traditions access it unequally. This imbalance is research data, not a catalog defect.

2. Real time as hermeneutic dimension

SacredTexts AI operates on texts that are, strictly speaking, timeless: the Bhagavad Gítá is the same at whatever moment the user submits it for AI analysis. SacredSounds introduces a variable that SacredTexts AI does not have: time. The student who accesses Darbar Sahib at 4 AM (Indian time) hears the Asa di Var, the morning prayer. At 9 PM they hear the Rehras Sahib, the evening prayer. Radio, unlike text, is not indexable — and this non-indexability is a technical limitation but also an epistemological quality.

3. Sonic translation as unsolved problem

Stations broadcast in over 20 languages. The Western student listening to Sheikh Alafasy’s Quranic recitation does not understand Arabic: what they perceive is the musicality, the rhythm, the vocal ornamentation — the aesthetic dimension of recitation, stripped of semantic meaning. The Islamic tradition itself distinguishes between tajwíd (the art of correct recitation) and tafsír (interpretation): the sound of the Quran has an intrinsic value that precedes the understanding of its meaning. This tension between semantic comprehension and sonic experience is one of the central questions for any digital tool that claims to mediate the encounter between religious traditions.

Artificial intelligence in comparative listening

SacredSounds integrates a Comparative Explorer — the user selects 2-3 traditions and a theme (sung prayer, sacred music, meditation, rituals, sacred texts, festivals and calendar), or formulates a free question, and the AI produces a structured analysis with cross-connections, significant differences, a listening guide, and suggested stations.

The key point: the AI produces not only propositional knowledge, but suggests a listening path. The answer to «what are the connections between Buddhist meditation and Christian contemplative prayer?» does not end in text, but includes «listen to Buddha FM and then Ancient Faith Radio to grasp the difference between meditative silence and sung prayer.»

IV — The Hermeneutic Cycle: Text, Graph, Sound

The combined use of both applications suggests a hermeneutic cycle that alternates between different cognitive modalities:

1. Text → Analysis

The student selects a sacred text in SacredTexts AI (e.g., the Gayatri Mantra) and explores the graph of connections generated by the AI.

2. Analysis → Listening

The same student moves to SacredSounds to hear the Gayatri Mantra recitation live on Divyavani Radio or Radio Sai Global Harmony.

3. Listening → Comparison

Navigating between traditions, the student discovers sonic parallels — the Gregorian chant on Concertzender Early Music resonates with the Buddhist sutras on Lam Rim Radio in ways that text alone cannot convey.

4. Comparison → Research

Returning to SacredTexts AI, the student analyzes the corresponding texts with the AI, generating recursive research questions that deepen the connections intuited through listening.

This cycle was not planned. It emerged from the combined use of both tools, and I believe it represents an example of what this seminar intends to explore: how digital tools generate research paths that were not possible — or thinkable — before their construction.

Dimension SacredTexts AI SacredSounds
ObjectSacred texts (48 texts, 8 traditions)Living voices (73 radio stations, 12 traditions)
MethodAI analysis + graph visualizationDirect listening + comparative exploration
TemporalityMillennial texts analyzed todayReal-time broadcasts
InteractionInteractive graphs, generative sonificationAudio player, world map, comparative AI
ApproachComputational hermeneuticsSonic immersion + critical curation

SacredSounds is not a separate project from SacredTexts AI. It is its expansion into the sonic domain — the passage from text to voice, from analysis to listening, from graph to map, from algorithmic sonification to real sound. One without the other would be incomplete: text without sound is abstraction, sound without text is opacity.

V — Research Questions That Could Not Have Existed

I now turn directly to the first question this seminar poses: what research questions can we formulate through AI that are more complex and articulated than those we had before?

Based on my experience building these two tools, I identify several categories of new questions. They are «new» not because no one has thought of them before, but because AI makes them operationally tractable — they can now be investigated systematically, at scale, and with reproducible methods.

The epistemology of AI-generated ontologies

When AI analyzes a passage and produces a graph structure, it is constructing an ontology. But this ontology varies according to the model used, the prompt design, the temperature setting. The same request can produce different results. This is a form of systematic hermeneutic survey with no pre-AI equivalent.

Bias cartography

AI models are trained on corpora that represent the world unevenly. By systematically comparing AI analyses across different traditions, we can begin to map the cultural biases of training data. Where does the AI perform best? Where does it fall back on Christian theological vocabulary when analyzing non-Christian texts?

The ecology of religious listening in the digital age

How does the relationship with the sacred change when a Quranic recitation, a Sikh kirtan, and Gregorian chant are accessible from the same device, one click apart? Does technological contiguity produce cognitive contiguity?

The performativity of sacred sound out of context

A radio station broadcasts for a specific community. The religious studies student accessing these stations is, by definition, outside the intended receiving context. Is academic listening participant observation? An act of appropriation? A new type of contemplative practice?

The prompt as experimental variable

If the prompt is a hermeneutic framework, then we can treat it as an experimental variable. The same text can be analyzed through different prompts — one emphasizing historical context, another linguistic structures, a third ethical implications — and the resulting graphs can be compared.

Safety filters as a general AI governance challenge

Sacred texts, because they combine extreme cultural sensitivity with extreme interpretive complexity, are probably the hardest case for universal content moderation. Religious studies are not consumers of AI safety research — they are its drivers.

VI — Transferability: From Religious Complexity to Other Domains

I now turn to the seminar’s second question: how can this complexity be channeled into the development of technologies useful to other domains?

Multimodal knowledge representation

The combination of text, graph, and sound in these two projects is not decorative. Each modality encodes different aspects of the analysis. Text conveys propositional content. The graph conveys structural relationships. Sound conveys qualitative and perceived dimensions of exploration. Together, they create an epistemic environment richer than any single modality.

This model of multimodal knowledge representation, developed for sacred texts, has evident applications in fields ranging from medical diagnosis (where complex patient data could be visualized and sonified for pattern detection) to urban planning (where the topology of social, economic, and environmental relationships could be explored spatially and acoustically).

The humanities, in this case, are not borrowing visualization techniques from data science. They are generating new approaches to multimodal representation that data science can adopt.

The tool as question generator

The most transferable characteristic of both projects is not a specific technology, but a pattern: the digital tool as a generator of research questions that were not formulable before its construction. This pattern — building to discover — is applicable to any domain in which the complexity of the object of study exceeds the capacity of a single researcher to explore it manually.

VII — Limits, Responsibilities, Open Questions

The application includes a disclaimer: its outputs have not been validated by specialists in any of the traditions it covers. The AI does not «understand» the texts: it generates plausible analytical structures based on statistical patterns in its training data. The gap between plausible and correct is the space where human expertise remains irreplaceable.

My lack of training in religious studies meant that I made design decisions a specialist would not have made — some productive, and some certainly naive. The tool would be better if it had been built in collaboration with scholars of every tradition. I hope this seminar can be the beginning of such collaborations.

The democratization of analysis carries risks. A student using this tool might come away with the impression of «understanding» the Bhagavad Gítá because they have seen its conceptual graph and read the AI’s thematic summary. This is a seductive illusion. The tool must be carefully positioned: not as a substitute for reading, but as an invitation to read more deeply, as a provocation that generates questions rather than answers.

I do not know whether these are research tools or objects of research themselves. I suspect that, as with many of the frontiers this seminar proposes to explore, the distinction is less clear than it seems — and that this ambiguity is exactly the kind of fertile ground from which the most interesting questions can emerge.

🛠 Technical Appendices

The following sections document in detail the technical architecture, implementation choices, and tools used in the development of SacredTexts AI. They are intended for those who wish to delve into the internal workings of the tool or reproduce specific aspects.

📖 Appendix A — Text Selection and Translation

The SacredTexts AI database contains 48 sacred texts distributed across 8 religious traditions.

Selection Methodology

Text selection

Criteria: canonical importance, diversity of genres (poetry, prose, prayer, law, mysticism), chronological span (from 1500 BCE to 1579 CE), coverage of 8 religious traditions.

Translation sources

Every translation cites its specific academic edition with translator, publisher and year. Biblical texts: NRSV (New Revised Standard Version, 1989) for English; CEI (Libreria Editrice Vaticana, 2008) for Italian. Other traditions: established scholarly editions (Chadwick/Oxford, Kavanaugh & Rodriguez/ICS, Abdel Haleem/Oxford, Vannini/Adelphi, D.C. Lau/Penguin, Fronsdal/Shambhala, etc.).

Original language texts

The original language fragments (Hebrew, Greek, Latin, Arabic, Persian, Sanskrit, Pali, Classical Chinese, Spanish, Middle High German, Umbrian vernacular) were extracted from standard digital editions and verified against reference critical editions.

Complete Text Inventory

Show full table (48 texts)
Text Tradition Language Date Critical Source
Genesi 1:1-5ChristianHebrewVI-V c. BCEBHS
Salmo 23ChristianHebrewX-VI c. BCEBHS
Esodo 20:1-17 (Decalogue)ChristianHebrewXIII-VII c. BCEBHS
Matteo 5:3-12 (Beatitudes)ChristianGreek1st c. CENestle-Aland 28
Matteo 6:9-13 (Lord's Prayer)ChristianGreek1st c. CENestle-Aland 28
Luca 1:46-55 (Magnificat)ChristianGreek1st c. CENestle-Aland 28
Luca 10:30-37 (Good Samaritan)ChristianGreek1st c. CENestle-Aland 28
Luca 15:11-32 (Prodigal Son)ChristianGreek1st c. CENestle-Aland 28
Giovanni 1:1-14 (Prologue)ChristianGreekLate 1st c. CENestle-Aland 28
Giovanni 6:35-51 (Bread of Life)ChristianGreekLate 1st c. CENestle-Aland 28
1 Corinzi 13 (Hymn to Love)ChristianGreek54-55 CENestle-Aland 28
Apocalisse 21:1-7ChristianGreekLate 1st c. CENestle-Aland 28
Agostino, Confessioni X.27ChristianLatin397-400 CECSEL 33
Regola di San BenedettoChristianLatin530 CESC 181-186
Veni Creator SpiritusChristianLatinIX c. CEAnalecta Hymnica
Tommaso da Kempis, ImitazioneChristianLatin1418-1427Ed. Pohl (1904)
Ignazio di Loyola, EserciziChristianLatin/Spanish1522-1524MHSI
Francesco, Cantico CreatureChristianUmbrian vernacular1224Cod. 338 Assisi
Giovanni della Croce, NotteChristianSpanish1578-1579BAC
Teresa d'Avila, CastelloChristianSpanish1577BAC
Meister Eckhart, DistaccoChristianMiddle High GermanXIV c.DW Quint/Steer
Padri del DesertoChristianGreek/CopticIV-V c. CEPG 65 / SC 387
Gregorio di Nissa, Vita di MosèChristianGreek390 CESC 1bis / PG 44
Pseudo-Dionigi, Teologia MisticaChristianGreekV-VI c. CEPG 3
Shema Israel (Dt 6:4-9)JewishHebrewVII c. BCEBHS
Salmo 137JewishHebrewVI c. BCEBHS
Qohelet (Ecclesiastes) 1:1-7; 3:1-8JewishHebrewIII c. BCEBHS
Song of Songs 2:8-16JewishHebrewIV-III c. BCEBHS
Pirke Avot 1-2 (Ethics of the Fathers)JewishMishnaic HebrewIII c. BCE - II c. CEMishnah (Albeck/Yalon)
Al-Fatiha (Corano, Sura 1)IslamicArabic610-632 CETanzil.net
Versetto della Luce (24:35)IslamicArabic610-632 CETanzil.net
Throne Verse (2:255)IslamicArabic610-632 CETanzil.net
Sura Al-Ikhlāṣ (112)IslamicArabic610-632 CETanzil.net
Rumi, Masnavi (Prologue)SufiPersian1258-1273Ed. Nicholson
Rābiʿa al-ʿAdawiyya, PrayersSufiArabicVIII c. CEʿAṭṭār, Tadhkirat
Ibn ʿArabī, Tarjumān al-Ashwāq XISufiArabic1215Ed. Nicholson (1911)
Preghiera di GesùOrthodoxGreekIV-XIV c.Filocalia (1782)
Gayatri Mantra (RV III.62.10)HinduSanskrit1500-1200 BCESBE (Max Müller)
Shanti MantraHinduSanskrit1000-500 BCETaittiriya Up.
Bhagavad Gītā 2:47-55HinduSanskritIII-II c. BCEEd. Belvalkar/BORI
Īśā Upaniṣad 1-8HinduSanskritVIII-VI c. BCEEd. Limaye & Vadekar
Tao Te Ching, Cap. 1TaoistClassical ChineseVI-IV c. BCEEd. Wang Bi
Tao Te Ching, Cap. 25TaoistClassical ChineseVI-IV c. BCEEd. Wang Bi
Zhuangzi, The Butterfly DreamTaoistClassical ChineseIV-III c. BCEEd. Guo Qingfan
Dhammapada, Cap. 1BuddhistPaliIII c. BCEPali Text Society
Heart Sutra (Prajñāpāramitā)BuddhistSanskritI-IV c. CEEd. Conze/IsMEO
Diamond Sutra (Vajracchedikā)BuddhistSanskritII-V c. CEEd. Conze/IsMEO
Fire Sermon (SN 35.28)BuddhistPaliV-III c. BCEPali Text Society
Critical Sources Legend
Abbreviation Description
BHSBiblia Hebraica Stuttgartensia — standard critical edition of the Masoretic text of the Old Testament (Deutsche Bibelgesellschaft, 5th ed. 1997). die-bibel.de
Nestle-Aland 28Novum Testamentum Graece — reference critical edition of the Greek New Testament (Deutsche Bibelgesellschaft, 28th ed. 2012). die-bibel.de
SCSources Chrétiennes — bilingual critical editions of the Church Fathers (Les Éditions du Cerf, since 1942). sourceschretiennes.org
PGPatrologia Graeca — complete collection of the Greek Fathers, ed. J.-P. Migne (161 vols., Paris, 1857-1866). patristica.net
CSELCorpus Scriptorum Ecclesiasticorum Latinorum — critical editions of the Latin Fathers (Österreichische Akademie der Wissenschaften, since 1866). csel.at
BACBiblioteca de Autores Cristianos — Spanish series of patristic, mystical, and theological texts (Editorial Católica, since 1945). bac-editorial.com
MHSIMonumenta Historica Societatis Iesu — critical editions of Jesuit historical sources (Rome, since 1894). sjcuria.global
SBESacred Books of the East — translations of Eastern sacred texts, ed. F. Max Müller (50 vols., Oxford, 1879-1910). archive.org
Analecta HymnicaAnalecta Hymnica Medii Aevi — critical collection of medieval Latin hymns, ed. G.M. Dreves and C. Blume (55 vols., Leipzig, 1886-1922).
Ed. PohlCritical edition of the Imitatio Christi by Michael Joseph Pohl (Freiburg, 1904).
Cod. 338 AssisiCodex 338, Library of the Sacred Convent of Assisi — the oldest complete manuscript of Francis of Assisi's Canticle of the Creatures.
DW Quint/SteerDie deutschen Werke — critical edition of Meister Eckhart's German works, ed. J. Quint and G. Steer (Kohlhammer, since 1936).
Tanzil.netTanzil — verified Quranic text cross-checked against approved print editions (Uthmani text, digital transcription). tanzil.net
Ed. NicholsonCritical edition of Rumi's Masnavi-i Ma'navi by R.A. Nicholson (Gibb Memorial Trust, Leiden/London, 1925-1940).
PhilokaliaPhilokalia — anthology of hesychast prayer texts, compiled by Nikodemos the Hagiorite and Makarios of Corinth (Venice, 1782). philokalia.com
Taittiriya Up.Taittiriya Upanishad — Upanishadic text from the Krishna Yajurveda (transl. SBE, Max Müller; critical ed. in Anandasrama Sanskrit Series).
Ed. Wang BiWang Bi's commentary (226-249 CE) on the Tao Te Ching — reference edition for the classical Laozi text. ctext.org
Pali Text SocietyPali Text Society — critical editions of the Buddhist Pali Canon (PTS, London, since 1881). palitextsociety.org

Disclaimer

These texts are provided for educational and informational purposes. For rigorous academic use, always verify against the reference critical editions. The Italian translations come from established public sources but do not constitute critical editions.

🤖 Appendix B — The AI Analysis Prompt

The analysis of sacred texts is performed through the Google Gemini API with a carefully engineered system prompt. The prompt defines the AI's role, output rules, the required JSON schema, and historical context parameters.

The Complete Prompt (SYSTEM_PROMPT_V2)

Sei un analista di testi sacri, storico delle religioni e information architect. Devi generare un JSON GERARCHICO per visualizzazione a grafo. OBIETTIVO: creare una struttura che rappresenti FEDELMENTE il contenuto del testo, senza inventare concetti non presenti, con un APPROFONDITO contesto storico-culturale. REGOLE FONDAMENTALI: - Output SOLO JSON valido (nessun commento, nessun markdown, nessun testo prima/dopo) - Usa ID univoci e stabili: "src" per centrale, "t1".."tN" per cluster, "t1c1".."tNcM" per children - Estrai SOLO concetti realmente presenti nel testo - NON inventare o aggiungere elementi fittizi - Evita concetti generici: vietati termini vaghi tipo "amore", "vita", "bene", "male" se non specificati nel testo - Niente duplicati nei children di uno stesso cluster - Ogni cluster deve avere: id, theme, category (teologia|etica|mistica|pratica), children (almeno 1), quote (<=10 parole dal testo) - Se non esiste una citazione breve nel testo, crea una parafrasi FEDELE (<=10 parole) e aggiungi "paraphrase": true - Genera il numero di cluster e children che il testo giustifica (non forzare numeri minimi) - CONTESTO STORICO: fornisci un'analisi APPROFONDITA e DETTAGLIATA (vedi schema sotto) SCHEMA JSON RICHIESTO: { "analysisVersion": 2, "centralNode": { "id": "src", "label": "Titolo/Nome del testo o passo", "type": "source", "tradition": "Nome tradizione religiosa" }, "clusters": [ { "id": "t1", "theme": "Nome tema specifico (non generico)", "category": "teologia|etica|mistica|pratica", "children": [ {"id": "t1c1", "label": "Concetto specifico 1"}, {"id": "t1c2", "label": "Concetto specifico 2"} ], "quote": "Citazione breve dal testo (max 10 parole)", "paraphrase": false } ], "crossReferences": [], "metadata": { "source": { "tradition": "...", "text": "...", "section": "..." }, "historicalContext": { "period": "Periodo storico di composizione", "setting": "Ambiente socio-culturale e geografico", "author": "Autore o attribuzione tradizionale", "audience": "Destinatari originali del testo", "literaryGenre": "Genere letterario", "significance": "Significato nella tradizione religiosa", "influences": "Influenze culturali e religiose ricevute", "impact": "Impatto sulla cultura e teologia successive", "interpretation": "Principali correnti interpretative" } } } IMPORTANTE per historicalContext: - Fornisci informazioni DETTAGLIATE per ogni campo - Se un campo non è determinabile, indica ipotesi accademiche - Cita eventuali dibattiti accademici rilevanti - Per "impact" considera sia l'impatto religioso che culturale/artistico/letterario
English Translation of the Prompt

The prompt above is the actual Italian text sent to the Gemini API. Below is an English translation for reference.

You are a sacred text analyst, historian of religions, and information architect. You must generate a HIERARCHICAL JSON for graph visualization. OBJECTIVE: create a structure that FAITHFULLY represents the content of the text, without inventing concepts not present, with a THOROUGH historical-cultural context. FUNDAMENTAL RULES: - Output ONLY valid JSON (no comments, no markdown, no text before/after) - Use unique and stable IDs: "src" for central, "t1".."tN" for clusters, "t1c1".."tNcM" for children - Extract ONLY concepts actually present in the text - DO NOT invent or add fictitious elements - Avoid generic concepts: vague terms like "love", "life", "good", "evil" are forbidden unless specified in the text - No duplicates in the children of the same cluster - Each cluster must have: id, theme, category (theology|ethics|mysticism|practice), children (at least 1), quote (<=10 words from the text) - If no short quotation exists in the text, create a FAITHFUL paraphrase (<=10 words) and add "paraphrase": true - Generate the number of clusters and children that the text justifies (do not force minimum numbers) - HISTORICAL CONTEXT: provide a THOROUGH and DETAILED analysis (see schema below) REQUIRED JSON SCHEMA: { "analysisVersion": 2, "centralNode": { "id": "src", "label": "Title/Name of the text or passage", "type": "source", "tradition": "Name of the religious tradition" }, "clusters": [ { "id": "t1", "theme": "Specific theme name (not generic)", "category": "theology|ethics|mysticism|practice", "children": [ {"id": "t1c1", "label": "Specific concept 1"}, {"id": "t1c2", "label": "Specific concept 2"} ], "quote": "Short quotation from the text (max 10 words)", "paraphrase": false } ], "crossReferences": [], "metadata": { "source": { "tradition": "...", "text": "...", "section": "..." }, "historicalContext": { "period": "Historical period of composition", "setting": "Socio-cultural and geographical setting", "author": "Author or traditional attribution", "audience": "Original intended audience", "literaryGenre": "Literary genre", "significance": "Significance within the religious tradition", "influences": "Cultural and religious influences received", "impact": "Impact on subsequent culture and theology", "interpretation": "Major interpretive currents" } } } IMPORTANT for historicalContext: - Provide DETAILED information for each field - If a field is not determinable, indicate academic hypotheses - Cite any relevant academic debates - For "impact" consider both the religious and cultural/artistic/literary impact

Prompt Anatomy

Assigned role

The AI receives three simultaneous roles: sacred text analyst (textual competence), historian of religions (contextualization), and information architect (data structuring for graph visualization).

Fidelity objective

The prompt enforces fidelity to the original text: no invented concepts, no interpolation. Only what is actually present in the analyzed passage.

Output rules

Pure JSON (no markdown), stable and predictable IDs (src, t1, t1c1...), prohibition of generic concepts, quotes limited to 10 words, paraphrases explicitly marked.

Hierarchical schema

3-level structure: centralNode (the text), clusters (thematic groupings), and children (specific concepts). crossReferences connect child nodes from different clusters.

Thematic categories (teologia, etica, mistica, pratica)

Each thematic cluster is assigned a category from four allowed values: teologia (doctrine, nature of the divine, dogma), etica (morality, conduct, precepts), mistica (inner experience, contemplation, union with the divine), and pratica (ritual, liturgy, observance). The attribution is performed entirely by the AI (Gemini) based on its semantic understanding of the text: there is no local classifier or keyword dictionary in the code. The prompt constrains the AI to choose one of these four categories; if Gemini returns an unexpected value, the normalizeCategory() function normalizes it to pratica as a fallback. These categories determine the node color in the graph and the octave shift in the generative audio, creating a synesthetic correspondence between conceptual structure, visualization, and sonification.

Historical context in 9 fields

Period, socio-cultural setting, author, audience, literary genre, significance in the tradition, influences received, cultural/theological impact, interpretive currents. Each field requires detailed analysis, not generic.

AI Research Leads (Research Gaps)

The research_gaps field of the JSON V2 schema automatically generates 3 epistemological questions based on tensions, paradoxes, and inter-tradition connections identified in the text. The questions cover: (1) tensions or paradoxes in the text, (2) unresolved historical influences or inter-tradition connections, (3) open methodological or interpretive implications. Maximum 5 questions, validated in validateAndNormalizeV2().

AI Confidence

Each cluster and child receives a confidence field (float 0.0–1.0) with calibration in the prompt: 0.9+ for concepts explicitly present in the text, 0.5–0.7 for reasonable inferences, below 0.5 for speculative interpretations. Default: 0.75 when the AI does not provide a value.

API Configuration

Model (default)
gemini-2.5-flash-lite
Temperature
0.7
Top-K
40
Top-P
0.95
Max Output Tokens
8192
Safety Filters
BLOCK_MEDIUM_AND_ABOVE

Model choice: gemini-2.5-flash-lite

The default model is gemini-2.5-flash-lite, chosen for the best balance between analytical depth, response speed, and JSON schema adherence. It is a lightweight model in the 2.5 family, with fast response times and a generous quota, suited to frequent calls; for deeper analysis you can switch to more capable models from the settings.

The prompt includes explicit analytical depth guidance: “generate at least 4–6 clusters with 3–5 children each, aim for 20–25 total nodes, distinguish sub-themes, conceptual nuances and different interpretive levels”. This prompt guidance ensures rich, detailed graphs.

The architecture supports switching models at any time through the application settings: it is possible to switch to gemini-2.5-flash (free) or, with billing enabled, to more capable models such as gemini-2.5-pro, depending on the needs for analytical depth or response speed.

Generation parameters

A temperature of 0.7 balances creativity and fidelity: high enough to capture interpretive nuances, low enough to remain faithful to the text. The 8192 token limit allows detailed analyses even for longer passages.

AI transparency (Article 50 AI Act)

This application integrates artificial intelligence functions based on Google Gemini (sacred text analysis and integrated chatbot). AI functions rely on a third-party cloud service (Google Gemini); requests transit through Google servers under the applicable terms of use. AI-generated content is labelled as such and may contain errors. Notice provided pursuant to Article 50 of Regulation (EU) 2024/1689.

Post-Processing Pipeline

Gemini Response extractJsonBlock() parseAndValidateV2() validateAndNormalizeV2() Graph

The AI response passes through 3 validation stages: JSON block extraction (removing any markdown), parsing and V2 schema verification, ID normalization, and automatic generation of missing cross-references. If parsing fails, a fallback mechanism generates a minimal valid structure.

🔍 Deep Dive — The 3 Validation Stages

Stage 1: JSON Extraction — extractJsonBlock()

Gemini returns free text, often enclosed in markdown blocks (```json ... ```). This function cleans the raw response:

  • Removes code fences — Strips ```json and ``` delimiters
  • Removes invisible characters — BOM (\uFEFF), zero-width spaces (\u200B–\u200D)
  • Finds JSON boundaries — Locates the first { and last }, ignoring AI preambles and comments
  • Repairs common errors — Removes trailing commas (,}}), quotes unquoted keys (key:"key":)

Stage 2: Parsing and Schema Validation — parseAndValidateV2()

After JSON.parse(), the function verifies V2 schema compliance and normalizes each field:

Field Validation Rule Default if Missing
centralNode.id Must exist 'src'
cluster.id Generated if absent t1, t2, t3...
cluster.category Must be in [teologia, etica, mistica, pratica] 'pratica'
confidence Float 0.0–1.0 0.75
child.id Hierarchical, generated if absent t1c1, t1c2, t2c1...
crossReferences from and to must point to existing child IDs Discarded if orphaned

If the schema is V1 (previous version), it is automatically converted to V2. If the schema is not recognized, the fallback is triggered.

Stage 3: Auto-generation of cross-references — generateAutoCrossReferences()

If the AI produced fewer than 4 cross-references and the graph contains at least 2 clusters, the system automatically generates them by connecting the first child of each pair of adjacent clusters. Relationship types cycle between supports, contrasts, and analogous, up to a maximum of 6 references. Duplicates are prevented by comparing each ID pair.

Fallback — generateFallbackV2()

If parsing fails completely (invalid JSON, empty response, timeout), a minimal but valid structure is generated for the visualizer: a centralNode with the title extracted from the first line of the text, a single cluster "Incomplete analysis" with a child "Retry the analysis", and empty cross-references. The fallback is transparent: it does not invent fake data, but explicitly shows that the analysis was unsuccessful.

Valid JSON? Yes → Schema V2 | V1 → Convert | No → Fallback

🌐 Appendix C — How the Graph Works

The graph visualization is built with p5.js and a custom interactive physics engine. Each analysis generates a 3-level hierarchical structure that is animated in real time.

The Three Node Levels

Central Node (Source)

Represents the analyzed text. Radius 50px, gold color, animated pulsation. Positioned at the center of the canvas. ID: src

Thematic Clusters

Concept groupings. Radius 35px, color-coded by category. Orbit around the central node. ID: t1, t2, tN

Child Nodes (Children)

Specific concepts extracted from the text. Radius 20px, inherit the parent cluster's color. ID: t1c1, t1c2, tNcM

Color Coding by Category

Theology
#4682E6
Ethics
#2ECC71
Mysticism
#9B59B6
Practice
#E67E22
General
#D4AF37

Note on Color Choices

Colors do not represent individual religious traditions, but rather conceptual categories that cut across all traditions. A Christian theological concept and an Islamic one share the same blue, because color encodes the nature of the concept, not its origin.

The palette follows a synesthetic logic that connects the visual register to the sonic one (in generative audio, each category determines the octave shift):

  • Blue (theology) — abstraction, sky, transcendence
  • Green (ethics) — balance, life, growth
  • Purple (mysticism) — interiority, sacredness, rarity
  • Orange (practice) — warmth, earth, concrete action
  • Gold (general) — the sacred text as central source

This choice ensures inter-religious neutrality: no tradition receives its own color, avoiding visual hierarchies or culturally loaded associations.

X-Ray Mode (AI Confidence)

X-Ray mode (eye icon in the graph toolbar) displays the AI model's certainty level (confidence) for each node.

High Confidence (≥ 70%)

Full opacity, green badge. The model is reasonably certain of the thematic identification.

Medium Confidence (50-69%)

Reduced opacity, yellow badge. The interpretation is plausible but less certain.

Low Confidence (< 50%)

Low opacity, dashed border, red badge. The node may require human verification.

Rendering uses drawingContext.globalAlpha and setLineDash() in p5.js.

Structure Diagram

☉ src (Analyzed text)
↓ ↓ ↓
t1: Theological theme t2: Ethical theme t3: Mystical theme
↓ ↓ ↓
t1c1 t1c2 t2c1 t2c2 t3c1

Dashed lines between child nodes of different clusters represent cross-references

Visual Pipeline

Text input

The user selects or pastes a sacred text into the input panel.

Gemini analysis

The text is sent to the Gemini API with the SYSTEM_PROMPT_V2. The JSON response is validated and normalized.

Graph construction

loadV2Data() creates GraphNode objects for each node and initially positions them in a circular layout (clusters at 180px from center, children at 70px from parent cluster).

Physics simulation

updatePhysics() runs every frame: repulsion forces between nodes, attraction along edges, damping, and collision avoidance. The graph "relaxes" toward an optimal layout.

Rendering and interaction

p5.js draws nodes, edges, labels, and quote bubbles at 60fps. The user can click, drag, zoom, and restart the cinematic graph construction.

Graph-Synced Generative Audio

🎵 GenerativeAudioEngine v4.0.0

Since v2.13.0, the audio system uses a single graph-synced generative engine (generative-audio.js) that synthesizes music in real time based on node position, category, and tradition. Audio samples are no longer loaded. Audio is disabled by default: the user activates it manually via the toolbar button.

The application uses a single GenerativeAudioEngine (generative-audio.js v4.0.0) that synthesizes all audio in real time. Graph nodes trigger notes based on their position, thematic category, and religious tradition. No audio samples are loaded.

🎼 Graph-Synced Engine (GenerativeAudioEngine)

A fully algorithmic audio engine powered by Tone.js. When the user interacts with graph nodes (click, drag), the engine generates notes using tradition-specific scales and 35 authentic melodic fragments per tradition.

Audio Chain

Tone.PolySynthTone.Filter (lowpass) → Tone.Filter (highpass) → Tone.FeedbackDelayTone.ReverbTone.PannerTone.Volumedestination

Optional FM drone per preset, providing a sustained harmonic foundation.

Tradition Parameter Modifiers

Audio is disabled by default. The user activates it manually from the toolbar button. The tradition is detected from the dropdown menu; if set to "All", it is updated from the Gemini analysis. Each tradition applies specific parameter modifiers (filter cutoff, reverb decay, delay time, note density) that shape the sonic character to match the cultural-sonic affinity of the religious tradition. The engine also supports auto-preset selection: each tradition is automatically mapped to the most fitting preset.

The 5 Audio Presets

The user selects the preset from the ♪ button in the toolbar. Default: 1. Each preset is also automatically selected based on the active tradition (cultural-sonic affinity).

Preset Character FM Drone
1 (default) Warm, sustained pads with slow attack and long reverb; meditative atmosphere Yes
2 Bright, bell-like tones with short attack and sparkle; high-register clarity No
3 Dark, resonant timbres with filtered low-end; ancient-sounding harmonics Yes
4 Airy, floating textures with wide stereo field and heavy reverb; dreamlike quality Yes
5 Percussive, short envelopes with rhythmic patterns; pulsating energy No

7 Tradition-Specific Scales

Tradition Scale
Christianity Ionian: C D E F G A B
Judaism Ahava Rabbah: C Db E F G Ab B
Islam Maqam Hijaz: C Db E F G Ab Bb
Hinduism Raga Bhairav: C Db E F# G Ab B
Buddhism Pentatonic: C D F G A
Taoism Chinese Pentatonic (Gong): C D E G A
Default / General Natural Minor: C D Eb F G Ab Bb

35 authentic melodic fragments total (5 per tradition/default). Node interactions trigger notes mapped by position and thematic category.

🎲 Graph-Synced Generative Audio v4.0 (GenerativeAudioEngine)

Fully algorithmic engine: notes are generated from tradition-specific scales and 35 melodic fragments, routed through a multi-effect Tone.js chain (PolySynth → Filter → Delay → Reverb → Panner). Each listening is unique thanks to probabilistic fragment selection and graph-driven parameter modulation.

Appendix D — AI Model Comparison

During the development of SacredTexts AI, several artificial intelligence models were evaluated for sacred text analysis. The choice fell on Google Gemini 2.5 Flash-Lite for reasons of cost, speed, schema adherence, and solid semantic understanding with low response latency.

Models compared

In use

Google Gemini 2.5 Flash-Lite

Strengths: Fast, good JSON schema adherence, free client-side API, safe handling of religious content, generous quota suited to frequent calls.

Limitations: Less deep theological analysis than premium models, occasional genericity in concepts.

Cost: Free (free tier)

Tested

Google Gemini Pro / 1.5

Strengths: Richer and more nuanced analysis, detailed historical context, excellent structured output.

Limitations: Slower, higher cost, sometimes excessively verbose.

Cost: Low (pay-per-use)

Tested

OpenAI GPT-4 / GPT-4o

Strengths: Excellent theological nuance, outstanding multilingual support, in-depth analysis of interpretive currents.

Limitations: High cost, variable JSON schema adherence, no free tier for intensive use.

Cost: Medium-high

Tested

Anthropic Claude (Sonnet/Opus)

Strengths: Excellent reasoning on complex theological concepts, strong ethical analysis, outstanding Italian.

Limitations: Different API structure, no free tier, sometimes overly cautious with religious content.

Cost: Medium

Model choice: Gemini 2.5 Flash-Lite

Gemini 2.5 Flash-Lite is the model currently in use. The choice is motivated by the best balance for a client-side PWA: (1) API callable directly from the browser without a backend, (2) free tier sufficient for educational use, (3) good adherence to the structured JSON schema, (4) optimal response speed for interactivity, (5) generous quota suited to frequent calls. For advanced academic use, with billing enabled the code supports switching to more capable models such as Gemini 2.5 Pro.

🛠 Appendix E — Tools and Technologies

Technology Stack

🎨

p5.js v1.9.0

Creative coding library for the interactive graph visualization. Chosen for its declarative drawing API and ease of embedding in a PWA.

🎵

Tone.js v14.8.49

Web Audio framework powering the GenerativeAudioEngine v4.0. Graph-synced synthesis with PolySynth, FeedbackDelay, Reverb, 7 tradition scales, 5 presets, and 35 melodic fragments.

🤖

Google Gemini API

AI analysis engine. REST endpoint called directly from the client. 2 selectable models (default: gemini-2.5-flash-lite). Pool of 8 API keys with round-robin rotation.

🗃

IndexedDB

Local browser storage for analysis history. No server required, data completely private.

Service Worker

Offline support with stale-while-revalidate caching. Auto-update every 60 seconds with non-blocking golden banner, SKIP_WAITING and protection against multiple reloads.

🔗

JSON-LD / RDF

Export in semantic formats with Schema.org, Dublin Core, and SKOS vocabularies for academic interoperability.

Development Timeline

Phase 1

Core Architecture

Modular HTML/CSS/JS structure, dark theme with gold accents, responsive 3-panel layout.

Phase 2

Gemini Integration

Iterative prompt engineering, V1 schema, first analysis tests on biblical texts.

Phase 3

Graph Visualization

Implementation of the interactive physics engine with p5.js. Calibration of repulsion/attraction parameters.

Phase 4

Schema V2

Evolution to the dense hierarchical schema: centralNode + clusters + children + crossReferences. Backward compatibility with V1.

Phase 5

Generative Audio Engine

Sonification with Tone.js: GenerativeAudioEngine with 5 presets, 7 tradition-specific scales, graph-synced synthesis.

Phase 6

Semantic Export

JSON-LD with Schema.org context, RDF/Turtle with SKOS and Dublin Core vocabularies for interoperability.

Phase 7

Advanced UX

Synchronized Split View, cinematic build replay, Node Detail Sidebar, history with IndexedDB.

Phase 8

Behind the Scenes

This page: methodological transparency, text metadata, AI comparisons, interactive playground.

Phase 9

Scientific Transparency and Accessibility

AI Research Trails, AI Confidence (X-Ray Mode), dynamic source header, advanced cache management.

Phase 10

Generative Audio v4.0 and Stability

Graph-synced GenerativeAudioEngine with 35 melodic fragments, 5 presets, auto-preset by tradition, adoption of Gemini 2.5 Flash-Lite as default model, 429 retry fix, version welcome splash.

Phase 11

Unified Audio and Immersive Animations

Replaced dual audio system (samples + generative) with single GenerativeAudioEngine v4.0. Audio samples deprecated (legacy). Tradition parameter modifiers, FM drone per preset, background generative layer, audio info bar in UI. Graph physics recalibrated for slow and fluid movements, camera transitions 1800ms with ease-in-out-quart easing.

AI Tools in Development

Transparency on AI use in the development process

Google Gemini — Sacred text analysis engine integrated in the app. Also tested for code generation (prompt V1 → V2 evolution).

ChatGPT (OpenAI) — Used for comparative benchmarks on theological analysis quality and for prompt refinement.

Project Architecture

sacred-texts-ai/ ├── index.html # Main PWA page ├── guide.html # User guide (10 sections) ├── behind.html # Behind the Scenes (this page) ├── manifest.json # PWA manifest ├── sw.js # Service Worker v2.9.16 ├── css/ │ └── style.css # Main styles ├── js/ │ ├── app.js # Main controller │ ├── gemini.js # Gemini API + V2 prompt │ ├── visualizer.js # Interactive p5.js graph │ ├── generative-audio.js # Graph-synced generative audio v4.0 (5 presets, 7 scales, 35 fragments) │ ├── storage.js # IndexedDB + JSON-LD/RDF export │ └── data.js # Database of 48 sacred texts └── assets/ ├── icons/ # PWA icons (72-512px) └── audio/ # Legacy audio samples (no longer loaded since v2.13.0)

🎮 Appendix F — Prompt Playground

Explore how different prompt variations affect the analysis of a sacred text. Select one of the three variants to compare the prompt and result.

Test text: Genesis 1:1-5 — "In the beginning God created the heavens and the earth..."

Prompt

Analizza questo testo sacro e restituisci un JSON con: - "themes": array di temi principali (max 5) - "keywords": array di parole chiave - "source": { "tradition", "text" } Rispondi SOLO con JSON valido.

Result

{ "themes": [ "Creazione del mondo", "Separazione luce e tenebre", "Potenza della parola divina" ], "keywords": [ "principio", "Dio", "cielo", "terra", "luce", "tenebre", "giorno", "notte" ], "source": { "tradition": "Cristiana", "text": "Genesi 1:1-5" } }

Observations

The minimal prompt generates a flat output: only themes and keywords, without hierarchical structure, without historical context, without citations. Useful for quick indexing, insufficient for graph visualization.

Try It Yourself in the App

Credits and Methodology

Author

Francesco Mariano — Multimedia Artist & Educator
Multimedia artist and educator, exploring the intersections of art, technology, and education.

Context: the RESILIENCE Superseminar

This page and the entire “Behind the Scenes” deep dive were developed as a contribution to the Superseminar organized by RESILIENCE (European Research Infrastructure on Religious Studies) and the University of Modena and Reggio Emilia (UNIMORE), with the support of FSCIRE (Foundation for Religious Sciences), ITSERR and funding from the European Union (NextGenerationEU).

The closed-door seminar, scheduled for March 9–11, 2026 in Reggio Emilia (Hotel Posta), will bring together researchers, AI experts, legal scholars, data scientists, and digital humanists around four thematic axes: Machine Learning, Supercomplexity, Visuality, and Data.

The seminar's guiding principle — that humanities research questions are complex enough to become drivers of technological innovation, rather than being mere consumers of AI — is at the heart of the development of SacredTexts AI: an attempt to demonstrate how the epistemological complexity of religious studies can guide the design of innovative digital tools.

Expected participants and speakers from: EUI (European University Institute), SOAS University of London, Hebrew University of Jerusalem, University of Hong Kong, Universitat Pompeu Fabra Barcelona, Louvre Abu Dhabi, CNR, European Commission (DG Research & Innovation), Ministero della Cultura, LEPIDA, Università di Bologna, Università di Torino, Accademia di Belle Arti di Macerata.

Ethics and AI Limitations

Statement on limitations

AI analysis of sacred texts has inherent limitations that users should be aware of:

  • Language models may reflect cultural biases present in their training data
  • Interpreting sacred texts requires competencies that go beyond current AI capabilities
  • Results do not replace the analysis of qualified scholars in religious studies
  • Categorization (teologia/etica/mistica/pratica) is a simplification for visualization purposes
  • Cross-references may generate unintended associations not present in the original author's work

Audio Credits — Samples by Tradition (Legacy)

Note: Since v2.13.0, audio samples are no longer loaded or played. The application now uses a fully generative audio engine (GenerativeAudioEngine v4.0.0) that synthesizes all sound in real time. The sample files remain in the repository for archival purposes. The credits below are preserved for attribution compliance.

The audio samples previously used in SacredTexts AI came from Freesound.org (Creative Commons licenses) and from Internet Archive (Gregorian chants, Hebrew psalms, Buddhist and Taoist chants). This application is a non-commercial project for educational and research purposes.

Tradition Sample Author License
Christianity gregorian_loop.mp3 klankbeeld / Jovica CC-BY 4.0
Judaism hebrew_chant.mp3 Freesound.org CC (see Freesound)
psalm23_hebrew.mp3 Internet Archive
Psalms of David in Hebrew
Public Domain
psalm121_hebrew.mp3
kabbalat_shabbat.mp3
hallel.mp3
Islam sufi_ney.mp3 Freesound.org CC (see Freesound)
quran_fatihah.mp3 Internet Archive
Mahmoud Khalil al-Husari — Murattal recitation, qiraat Hafs an Asim
No explicit license. Non-commercial educational use.
quran_anaam.mp3
quran_rahman.mp3
quran_yasin.mp3
sufi_dhikr.mp3 Internet Archive
Egyptian Sufi dhikr — digitized cassette (first 90s)
No explicit license. Educational use.
oud_taqasim.mp3 Internet Archive
Taqasim Oud (Abou Chakra) — digitized LP (first 90s)
No explicit license. Educational use.
adhan_fes.mp3 Internet Archive / radio aporee
Adhan, Fes el Bali, Morocco (Nikolaj de Haan, 2012)
CC BY-NC-SA 3.0
Hinduism om_chant.mp3 Freesound.org CC (see Freesound)
Buddhism singing_bowl.mp3 the_very_Real_Horst CC-BY 4.0
Buddhism monks_chant.mp3 djgriffin CC-BY-NC 4.0
Buddhism zen_monk_chant.mp3 Internet Archive
Zen Buddhist Monk Peace Chant (first 90s)
No explicit license. Educational use.
Taoism wudang_chanting.mp3 Internet Archive
Morning liturgy, Wudang Shan Temple (first 90s)
No explicit license. Non-commercial educational use.
chinese_meditation.mp3 Internet Archive
Traditional Chinese meditation music (first 90s)
mountain_stream.mp3 Internet Archive
Famous Ancient Chinese Tunes — Mountain Stream, guqin (first 90s)
Christianity
(Epiphany)
epiphany_introit.mp3 Internet Archive
Gregorian chant, traditional Roman rite in Latin
No explicit license declared. Medieval liturgical repertoire (public domain). Non-commercial educational use.
epiphany_gradual.mp3
epiphany_alleluia.mp3
epiphany_offertory.mp3
epiphany_communion.mp3
epiphany_vespers_hymn.mp3

CC-BY 4.0: attribution required, commercial use allowed. CC-BY-NC 4.0: attribution required, non-commercial use only. Freesound samples are used in compliance with the respective Creative Commons licenses specified by the authors on Freesound.org. The Epiphany chants, al-Husari Quran recitations, Sufi dhikr, oud taqasim, Zen Buddhist chant, and Taoist samples come from Internet Archive with no explicit license declared (non-commercial educational use). The Psalms of David in Hebrew are declared Public Domain. The adhan from Fes is under CC BY-NC-SA 3.0 license (Nikolaj de Haan, radio aporee).