Pesach Series: From Liberation to Illumination
How AI Helped Uncover a Crescendo of Hope in the Warsaw Ghetto
I'm honored to share this week's MefarshAI exploration—a deeply meaningful collaboration with my Rav, Brahm Weinberg, of Silver Spring MD’s Kemp Mill Synagogue (KMS). Our journey began when Rabbi Weinberg—a lifelong friend and one of MefarshAI's most active subscribers—reached out with a special request: to create a "MefarshAI style" piece for this year's KMS Pesach book. Over several weeks of intensive sessions, Rabbi Weinberg and I explored the timeless themes of Pesach through a powerful new lens: tracing the remarkable spiritual journey of Rabbi Kalonymus Kalman Shapira (the Piaseczner Rebbe) through his wartime sermons.
Please enjoy this 11th issue of MefarshAI.

Image created with ChatGPT's new image generation feature in 4o
A Journey from "Freedom From" to "Freedom To"
Our exploration began with a simple but profound framework: Isaiah Berlin's distinction between "freedom from" (liberation from oppression) and "freedom to" (the capacity to pursue purpose and meaning). This framing unlocked our approach to Pesach not merely as a historical liberation but as a spiritual transformation.
Working with Rabbi Weinberg, I set out to analyze how these dual aspects of freedom manifest across Jewish text and thought, with a particular focus on the Piaseczner Rebbe—one of Rabbi Weinberg's spiritual mentors whose writings and thoughts frequently inspire his drashot. The Rebbe's collection of Warsaw Ghetto sermons, Esh Kodesh ("Holy Fire"), offers a remarkable window into spiritual resistance during humanity's darkest hour.
The Challenge: Translating Before Analysis
Our most significant technical challenge emerged early: the agentic nuances of the Piaseczner Rebbe's Hebrew text—its subtle emotional cadences, spiritual intensity, and theological depth—required careful translation before any AI analysis could begin. Unlike straightforward text, Esh Kodesh contains layers of meaning that automated translation would miss entirely.
We approached this challenge by developing a hybrid methodology combining traditional scholarship with cutting-edge AI capabilities. First, we used GPT-4 with a carefully designed prompt architecture to segment the 142 sermons in Esh Kodesh by identifying Hebrew header patterns and date markers. This allowed us to create a chronological map of the text—critical for tracing the evolution of the Rebbe's thought through progressively harsher ghetto conditions.
As Rabbi Weinberg noted in one of our sessions:
"The Piaseczner's language shows a distinct crescendo of hope, faith, and redemptive expectation as external persecution intensified. These subtle shifts in tone and theological framing are precisely what we needed to capture."
Once we had the text properly segmented and dated, we employed human translators with deep Chassidic knowledge to render key passages into English, preserving the nuanced theological terminology and emotional undertones that machine translation would have flattened. This human-AI collaboration created a dataset that could be properly analyzed by our computational tools.
Revealing the Crescendo Through Data
What emerged was striking. Using advanced natural language processing techniques, we created a custom thematic taxonomy that went beyond simple keyword counting. Our expanded taxonomy included themes like:
- Freedom From: exile, yoke, darkness, sorrow, judgment, silence
- Freedom To: ascend, purpose, covenant, Torah, rebuild, flame
- Hope/Redemption: salvation, dawn, trust, light, compassion
- Divine Presence: Shekhinah, voice, mercy, shadow, engraved, eternal
- Spiritual Strength: endure, rise, sacrifice, prince, stand, wrestle
- Gratitude: Dayeinu, thanks, praise, rejoice, abundance
- Communal Torah: mitzvah, responsibility, Israel, teach, memory, children
We then used sentiment analysis algorithms retrained on rabbinic Hebrew to calculate thematic intensity scores for each sermon, mapping them against historical events in the Warsaw Ghetto—from the initial invasion to the final deportations. The AI identified patterns human readers might miss across 142 sermons spanning three years.
"When we compared sermons from Rosh Hashanah 1939 to those from Passover 1942," I explained in one session with Rabbi Weinberg, "we found a nearly five-fold increase in themes of hope, divine intimacy, and redemptive vision—precisely when the physical reality was at its bleakest."
Rabbi Weinberg added historical context to this finding: "The sermon from Parashat HaChodesh 1942, delivered right before what would be the Rebbe's final Pesach in the Ghetto, revealed how even in brokenness, one could still learn Torah and find strength."
From Analysis to Artifact
Our final artifact for the KMS Pesach Guide, "Freedom as Living Memory, Gratitude, and Purpose," represents the culmination of this collaborative journey. In it, we synthesize our findings into a cohesive reflection that carries forward the Piaseczner Rebbe's profound message for contemporary readers.
Using ChatGPT and OpenAI's advanced 4o model, we iteratively developed the essay structure, seamlessly weaving quotations from the Rebbe's sermons with analyses of their historical context and spiritual significance. The technology helped us distill complex patterns into powerful insights while maintaining the authentic voice and depth of the original texts.
The piece examines how true freedom involves both physical liberation and spiritual purpose, illustrated through the Piaseczner Rebbe's remarkable ability to maintain hope against impossible odds. We've included a modern reimagining of "Dayeinu" that carries forward this message of both gratitude and aspiration.
Behind the Scenes: Deep Dive into Our Human-AI Torah Lab
What made this project special was the genuine dialogue between traditional Torah scholarship and cutting-edge technology. Rabbi Weinberg brought deep textual knowledge and spiritual insight, while I leveraged a sophisticated AI toolkit to excavate patterns hidden within these profound texts.
Our Technical Workflow
- Text Segmentation & Dating: We began by writing specialized regex patterns and prompt chains that enabled ChatGPT and o1 Pro to accurately identify sermon headers in the Hebrew text—capturing date markers, parasha references, and holiday indicators. This allowed us to organize all 142 sermons chronologically and match them to key events in the Warsaw Ghetto timeline.
- Translation Pipeline: Working with Hebrew specialists, we created a two-stage translation process. First, AI tools provided base translations of complex Hebrew and Yiddish passages. Then human reviewers with Chassidic background refined these translations to preserve theological nuance and emotional resonance—especially critical for capturing the Rebbe's unique spiritual language.
Multi-dimensional Analysis: Rather than simple word frequency counts, we developed a custom NLP pipeline that:
- Generated normalized theme intensity scores across different sermon lengths
- Identified linguistic patterns showing increasing spiritual yearning
- Mapped theme frequency against historical events to reveal the "crescendo"
- Created visualizations showing how hope and redemptive language grew stronger even as physical conditions deteriorated
- Visualization Engineering: Using Google Colab for Python-based text processing and data analysis in coordination with ChatGPT, followed by Google Gemini through Google Docs/Sheets, we constructed visualizations that revealed the crescendo effect—showing how redemptive themes intensified from early sermons in 1939 to the peak spiritual resistance of Pesach 1942, just before the Ghetto's destruction.
- Integrated Synthesis: The final essay wasn't merely AI-generated—it represented a true collaboration where Rabbi Weinberg's deep knowledge of the Piaseczner's thought guided our prompting strategy, while AI tools helped identify patterns across hundreds of pages of text that would otherwise require months of manual analysis.
Overcoming Technical Hurdles
Throughout this project, we encountered and solved numerous technical challenges:
- Hebrew Text Processing: Standard NLP tools struggle with right-to-left languages and Hebrew's morphological complexity. We developed custom tokenization and normalization routines that properly handled Hebrew's unique characteristics.
- Historical Context Integration: To properly interpret the sermons, we needed to align them with precise historical events. We created a detailed event database covering both Jewish and Gregorian calendar dates of key Warsaw Ghetto milestones.
- Sentiment Detection in Sacred Text: Conventional sentiment analysis fails when applied to religious texts where suffering and hope are often intertwined. We retrained our models on rabbinic literature to better capture the unique emotional landscape of religious resilience.
- Cross-modal Pattern Recognition: We developed techniques to correlate linguistic patterns with historical events, enabling us to demonstrate how the Rebbe's spiritual language evolved in response to deteriorating physical conditions.
This collaboration wasn't about replacing traditional study with technology. It was about using these tools to illuminate aspects of sacred texts that speak directly to our most pressing spiritual questions. As Rabbi Weinberg noted, "The AI didn't create new interpretations—it helped us see patterns across the breadth of the Rebbe's wartime teachings that would be nearly impossible to discern through conventional study methods. The combination of o3-mini-high for initial text analysis and 4o for deeper pattern recognition gave us insights we simply couldn't have reached otherwise."
What's Next?
As I continue exploring the intersection of Torah and technology at MefarshAI, I remain committed to projects that honor tradition while embracing innovation. I'm particularly interested in how AI can help recover and amplify voices from the past that offer guidance for our present challenges.
These methods can be applied to other vast corpora of Jewish wisdom—from tracing the evolution of halachic concepts across centuries of responsa to mapping thematic connections between seemingly disparate midrashic sources. The possibilities for enriching our understanding of Torah through these technologies are just beginning to unfold.
Please SUBSCRIBE and SHARE MefarshAI so this exploration of Torah and AI can continue each week.
May the enduring wisdom of teachers like the Piaseczner Rebbe inspire your own journey from freedom to meaning this Pesach.
Chag Kasher v'Sameach,
Dave Weinberg
MefarshAI, April 2025