---
marp: true
theme: iaser
html: true
headingDivider: false
paginate: true

---

<!-- _class: title -->
<!-- _paginate: false -->
<!-- _header: "" -->
<!-- _footer: "" -->

# Leveraging AI to Serve the Ummah

### A hands-on workshop for Muslim community leaders

Dr M Waleed Kadous
Azka Events & Catering, Elmont, NY — Sunday 27 September 2026
*In cooperation with The Ibadi Foundation, ISD and FITYA*

---

<!-- _class: impact -->

# Session 1 — Introduction

---

![bg right:35% w:300](imgs/qr-azka26.png)

## Materials

**Everything you need: [s.iaser.ai/azka](https://s.iaser.ai/azka)**

| Link | URL |
|---|---|
| Slides | [s.iaser.ai/azka](https://s.iaser.ai/azka) |

*Scan the QR or visit s.iaser.ai/azka for the full materials doc.*

---


## Goals for today

- Understand why mastering AI is critical to the Ummah — starting with ourselves
- Practical tools across 5 approaches: **creativity, productivity, customization, multimodal, knowledge**
- Know what to watch for: **bias, hallucination, non-compliance, emotional connection**
- Help our communities deal with the challenges of AI

---

<!-- slide 11 -->
## Plan for today

A compressed version of a 6-hour course: today the **core material**; the slides also include the **extended material**.

1. **Overview** — How can AI help me? What do I need to avoid?
2. **Deep Dives** — Preparing the Community for AI, Using AI for Islam-related work
3. **Support after** — Community to keep learning together

---

## Part 1 — Overview

- Introduce the tools and how to use them safely
- **5 approaches** to using AI, **4 things** to watch for
- Show the many ways it can help you
- You'll need to follow up afterwards and teach yourself

---

## Part 2 — Deep Dives

- Take typical Da'wah activities and **actually build** with the tools
- Preparing the Community for AI · Using AI for Islam-related work
- *Build the table, the chair, the shelf — not just look at the toolbox.*

---

## Part 3 — Support Group

- Community to keep using AI well after today
- Dr Hidayath and I will answer your questions
- We learn faster together than alone
- **[walee.dk/amjawa](http://walee.dk/amjawa)** — *by invitation*

---

<!-- slide 16 -->
## Participate!

- Have your laptops open (but maybe close your email and whatsapp windows)
- Feel free to ask questions at any time.
- Our experience is questions make the course richer
- We've allocated time in the schedule for Q + A
- This is all very new stuff and we are learning together
- However, we may ask to hold off if we're behind or it's covered elsewhere

---

<!-- slide 18a -->
## Teach a daee to fish — General AIs

- We will use particular tools here, but that is not an endorsement
- The main "general" AIs we will use today
  - **gemini.google.com** — free with reasonable limits
  - **claude.ai** — now available for free; my "daily" AI
  - **Paid plans (~$20/month)** unlock **better models** and **more usage**
  - Personally, avoid ChatGPT, CEO is morally suspect

---

<!-- slide 18b -->
<style scoped>li { font-size: 30px !important; }</style>

## Teach a daee to fish — Islamic AIs

- **askansari.ai** — open source, created by Waleed
- **usul.ai** — next-generation Shamela
- **qaf.ai** — kind of usul v2
- **aifiqh.com** — 24,000+ classical texts
- **islamify.ai** — overseen by a scholars' council
- **dalail.ai** — Arabic first

---

<!-- _class: impact -->

# Session 2 — Five Approaches to Using AI

---

<!-- slide 31 -->
## How we'll do this

- 5 ways to use AI
- For each:
  - Discuss some examples
  - Your turn: how can you use this to serve the Ummah as an Daee?
  - We will discuss as a group.

---

<!-- slide 33 -->
![bg right:35% w:380](imgs/siwak.png)
## Try to pass the siwak test

- Larry Page taught us at Google to find the most impactful products
- Look for things like toothbrush (or **siwak**!) that you use twice a day
- What things do you do twice a day that you could use AI to help with?

---

<!-- slide 36a -->
<!-- _class: question -->

# The Principle of AI Infinite Regression

---

<!-- slide 36b -->
<!-- _class: focus -->

# “The solution to a problem around AI is…”

---

<!-- slide 36c -->
<!-- _class: focus -->

# “The solution to a problem around AI is… **more AI.**”

---

<!-- slide 38 -->
## Corollaries

- The best way to learn AI is to … ask AI
- The best way to design prompts is to … ask AI
- The best way to check AI is to … ask another AI

---

<!-- slide 40 -->
## AI helps with AI

- Step 1: Go to **gemini.google.com** or **claude.ai**
- Step 2: Type the same prompt into both. See how they respond.
- “I serve the Muslim Ummah by &lt;FILL IN&gt;. Give me 5 ideas for how I can use AI for &lt;problem&gt;.”
- Step 3 (very important): Think, contemplate, select.
- Step 4 (optional): Discuss, refine, iterate.
- Step 5: Share with the group.

---

<!-- _class: impact -->

## Approach 1 — Creativity

---

<!-- slide 43 -->
## Creativity

- AI can help you come up with ideas.
- It can help be a sounding board for your ideas.
- Example: coming up with analogies.
- You can also use it to generate images and videos that you don’t have the skill to make yourself.

---

<!-- slide 45 -->
## Give me n &lt;a&gt; for &lt;problem b&gt;

![w:800](imgs/enumeration.png)


---

<!-- slide 47 -->
## Generating Images

![w:420](imgs/genimage1.png) ![w:420](imgs/genimage2.png)

---

<!-- slide 48 -->
## Generating Videos

![w:480](https://media.iaser.ai/amjaws/imgs/genvideo1.gif?v=1) ![w:480](https://media.iaser.ai/amjaws/imgs/genvideo2.gif?v=1)


---

<!-- slide 49 -->
## Tools I used + Special tips

- Images
  - Now built in to Gemini and ChatGPT
  - Many more: Runway, Midjourney, Leonardo
- Videos: **Gemini Omni** (in the Gemini app) · **Google Flow** (creative suite)
- **Special tip:** writing prompts for image/video generation is hard — *use AI to craft the prompt!*

---

<!-- slide 49b — verbatim from gmc26 "Where AI Video Is Today" -->
## Where AI Video Is Today

- **Super powerful with words** — getting better with video
- Video is **still improving — in its infancy**
- Video creation takes a ***lot* more iteration**

---

<!-- slide 51 -->
## Your turn!

- What are some ways you can use AI for **creativity**?
- Share it with others!
- You have 3 minutes, then we’ll discuss as a group.

---

<!-- _class: impact -->

## Approach 2 — Productivity

---

<!-- slide 55 -->
## Productivity

- Anything that used words can now be done more quickly
- Examples:
  - Automatically drafting e-mail responses
  - Generating summaries for your articles
  - Extract information from pdfs
  - Understanding images
  - You can automate things

---

<!-- slide 57 -->
## Examples

- Adapt this khutbah for the newsletter
- Summarize the feedback from the event survey
- Put together this grant proposal based on this application proposal and our last grant proposal
- Write a bio for this speaker based on Linkedin

---

<!-- slide 59 -->
## Special tool highlight: Scheduled actions

- You can ask AI to do something for you every so often.
- Example:
  - “I want an update on the latest developments in AI every Monday”
  - “Send me an update on the latest developments in the Ummah every Thursday night”

---

<!-- slide 61 -->
## Your turn!

- What are some ways you can use AI for productivity?
- Share it with others!
- You have 3 minutes, then we’ll discuss as a group.

---

<!-- _class: impact -->

## Approach 3 — Customization

---

<!-- slide 65a -->
## Customizing

- Make AI fit your situation, instead of one-size-fits-all.

---

<!-- slide 65b -->
## Customizing — Examples

- You have a writing style and when you use AI to write it doesn’t sound like you. You can teach AI your writing style.
- You have donors who have different interests. You can tailor your update to focus on their interests.
- You have a presentation to PhDs, and now you want to present to high school students.

---

<!-- slide 66 -->
## Your turn!

- What are some ways you can use AI for **customizing**?
- Share it with others!
- You have 3 minutes, then we’ll discuss as a group.

---

<!-- _class: impact -->

## Approach 4 — Multilingual + Multimodal

---

<!-- slide 70a -->
## Multilingual

- We are a community blessed with many languages
- AI is very good at translating between languages
- Have done evaluations of translations e.g. of Zad Al Masir by Ibn Al Jawzi
- On par with human!

---

<!-- slide 70b -->
## Multimodality

- Can understand images
- Can transcribe audio
- Can convert a lecture from text to a podcast

---

<!-- slide 72 -->
## Just how good is it?

![w:900](imgs/demo-good2.png)


---

<!-- slide 73 -->
## Special tool highlight: Gemini Notebook from Google

- Have a long drive? Why not convert a book into a podcast?
- notebook.google.com
- Special page with all the AMJA presentations uploaded, audio summary, video summary, mind map.
  - s.iaser.ai/amjanb
- Public, so all of us can use it.

---

<!-- slide 75 -->
## Your turn!

- How could you use AI for languages, images and audio?
- Share it with others!
- You have 3 minutes, then we’ll discuss as a group.

---

<!-- _class: impact -->

## Approach 5 — Knowledge: Research, Learning, Teaching

---

<!-- slide 81 -->
## Potential — Finding Information

- AI’s ability to find information is just phenomenal
  - Example: Claude AMJA project + Gemini Notebook
    - Uploaded all papers
    - Can ask it anything and I mean anything
  - Example 2: qaf.ai
    - Researches 8,000+ Islamic books, answers with citations

---

<!-- slide 83 -->
## Potential — Tailoring Content

- It can fit the answer to the person in front of you.
- Explain Qadar to someone at different levels

---

<!-- slide 84 -->
## Special tool highlight: Deep Research

- Gemini Deep Research
- Give it a topic, and let it run for 15 minutes
- Use it for Islamic stuff but also for dunya stuff
- Examples:
  - What donor management software should we use?
  - What is the history of calligraphy in Islam?
  - Tell me how other Muslim non-profits are using AI
- Highly researched, highly supported
- Be careful using for Islamic topics
- Ansari.chat does not have deep research, nor does any system

---

<!-- slide 86 -->
## Your turn!

- How could you use AI for research, learning and teaching?
- Share it with others!
- You have 3 minutes, then we’ll discuss as a group.

---

<!-- _class: impact -->

# Break

---

<!-- _class: impact -->

# Session 3 — Four Things to Watch For

---

<!-- slide 91 -->
## Bias – in the old days

![w:1100](imgs/bias-old.png)

---

<!-- slide 93 -->
## Now more subtle — e.g. homosexuality

![w:1100](imgs/bias-subtle1.png)

---

<!-- slide 95 -->
## Now more subtle — e.g. homosexuality *(continued)*

![w:1100](imgs/bias-subtle2.png)

---

<!-- slide 99 -->
## Bias — another example

![w:1100](imgs/bias-extra.png)

---

<!-- slide 97 -->
## Solution?

- Use an Islamic AI Assistant
- Using another AI? Be very specific in your prompt.

---

<!-- slide 100 -->
<!-- _class: impact -->

# Hallucination

---

<!-- slide 100b -->
## Hallucination

![w:1100](imgs/hallucination.png)

---

<!-- slide 101a -->
## Has gotten much better

- Much less of an issue now. ChatGPT no longer makes that mistake.
- But still need to watch
- The key approach change:
  - Grounding in concrete sources
  - Most AIs now include web search
  - Gone from a disconnected brain to a brain + library working together

---

<!-- slide 101b -->
## askansari.ai is grounded in:

- Quran
- Hadith
- Encyclopedia of Islamic Fiqh (from kuwaiti awqaf)
- Encyclopedia of Evidence-based Tafseer (tafseer bil-ma’thoor)

---

<!-- slide 103 -->
## Solution

- Use AI grounded in Islamic sources: askansari.ai, usul.ai, dalail.ai
- If you must use non-Islam-grounded AI
  - Emphasize need for grounded and evidence-based answers
  - Emphasize the sources that you want it to use

---

<!-- slide 105a -->
## Non-compliance + randomness

- Bias + hallucination are not solved, but are well understood
- This one annoys me most, every day.

---

<!-- slide 105b -->
## Non-compliance

- AI doesn’t do what you tell it to
- Be concise, then produces a 500 word answer

---

<!-- slide 105c -->
## Randomness

- AI does things you didn’t tell it to
- Concrete examples:
  - randomly rounding numbers to the nearest 5%
  - You ask it to shorten a doc and it drops the most important part

---

<!-- slide 107b -->
## Solutions: Randomness

- **Review every word.** Every. Word.
- Watch as the AI works — click into thinking blocks, check it uses the correct sources
- Fix your prompt so it doesn't happen again.
- *So many embarrassing stories — it's not just students who get busted for using AI*

---

<!-- slide 109a -->
## AI feels human, but it’s not

- We treat everything like a person — even a machine.
- A very natural tendency
  - An interaction with Ansari in the tiny hours
- Starting to see people build relationships with AI
  - Dead people, relationships (some indecent)

---

<!-- slide 109b -->
## AI feels human — companies exploit this

- Some companies are exploiting this deliberately (e.g. OpenAI)
  - GPT-4 got in trouble for being too “sycophantic” – would agree with the human.
  - “Flattery will get you everywhere, even if it’s AI”
  - GPT-5 was less sycophantic and this led to a HUGE backlash.
  - Users demanded continued access to GPT-4 … and they got it

---

<!-- slide 111 -->
## What is actually happening

![w:1000](imgs/whats-happening.png)


---

<!-- slide 113 -->
## AI is really highly advanced next word prediction

![w:1000](imgs/word-prediction.jpg)

- … Trained on every word humanity has ever written


---

<!-- slide 115 -->
## Like a parrot with a very big memory

![w:1100](imgs/parrot.png)


---

<!-- slide 116a -->
## Solutions: Understanding how it works

- Understanding how it works
  - Helps to convince you it’s not human
  - It learned everything from us. It didn't start from nothing.
  - So "AI proves there's no God" makes no sense — it's a poor mirror of Allah's creation.

---

<!-- slide 116b -->
## Solutions *(continued)*

- Very analogous to how social networks “hack” dopamine for views
- This one has no clear solution
- Something we will have to guide our communities through
- This is the most “intrinsic” problem with AI. It won’t be fixed, it will probably get worse

---

<!-- slide 118a -->
## Conclusions — Why & How

- The Ummah must be at the forefront of AI — **especially Imams**
- Pick things you do regularly. Ask AI: *"how can you help me?"*
- **Experimentation matters.** Try, observe, refine.

---

<!-- slide 118b -->
## Conclusions — 5 Approaches to Using AI

1. **Creativity**
2. **Productivity**
3. **Customization**
4. **Multilingual / Multimodal**
5. **Knowledge** *(research, teaching, learning)*

---

<!-- slide 118c -->
## Conclusions — 4 Things to Watch For

- **Bias.** *Fix:* use Islamic AI or prompt carefully.
- **Hallucination.** *Fix:* use Islamic AI or ground results.
- **Non-compliance & randomness.** *Fix:* prompt forcefully, review every word.
- **Emotional connection.** *Fix:* remember — it's just numbers.

---

<!-- _class: impact -->

# Session 4 — Using AI for Islam

---

## The dangers of using AI for Islamic work

- **Bias** — subtle, e.g. homosexuality
- **Hallucination** — made-up hadith, verses, citations
- **Non-compliance & randomness** — it doesn't do what you ask, and varies each time
- **Emotional connection** — it feels human, but it's just numbers

---

<!-- slide 18b2 — benchmarks -->
<style scoped>li { font-size: 28px !important; }</style>

## Benchmarks for Islamic accuracy

- New: benchmarks now measure how accurate these tools are — **IslamicMMLU**, **IslamicLegalBench**
- Live leaderboard: **[huggingface.co/spaces/islamicmmlu/leaderboard](https://huggingface.co/spaces/islamicmmlu/leaderboard)**

![w:1000](imgs/islamicmmlu-leaderboard.png)

---

<!-- _class: impact -->

# The alternatives

---

<!-- slide 156 -->
## How these tools work: RAG

- These are all RAG systems — Retrieval Augmented Generation.
- **RAG means:** before you use the LLM, you retrieve context
- Example: someone asks about Zakat eligibility
  - AI looks at the question and decides to search using another tool, in this case Qur'an
  - It comes back with the Qur'anic Ayah
  - Adds this to the prompt
- RAG massively reduces hallucination

---

<!-- slide 158 -->
## Think of RAG as Prompt Expansion

- Initial Prompt: “What are the categories of Zakat? ”
- AI Pass 1: I should probably search the Qur’an for that. Let me search the Qur’an …
- Tool: Here are 10 ayahs around zakat
- Expanded Prompt:
- “What are the categories of Zakat? Please consider this information in answering
- &lt;Quran verse&gt; …”
- AI Pass 2: OK, the 8 categories of Zakat based on Ayah …

---

<!-- slide 161 -->
## RAG in action

![w:900](imgs/rag-in-action-en.png)

---

<!-- slide 164 -->
## Why RAG is good

- RAG is a form of context — **more context constrains the AI and reduces hallucination**
- More context leads to better results

---

<!-- slide 166 -->
## The Limits of RAG

- Pay for LLMs by the number of word segments (tokens)
- The more words you provide and the more words you produce
- The longer it takes
- The more it costs
- Example:
- Ansari is very RAG-intensive – every conversation costs about 20 cents

---

<!-- slide 168 -->
## Limits of RAG part 2

- AI has a context window – maximum number of words it can process at once
- Claude: 200,000 tokens = ~150,000 words, ~300 pages
- Gemini: 1,000,000 tokens = ~750,000 words, ~1500 pages
- Typical Ansari conversation is ~100,000 tokens

---

<!-- slide 154 -->
<style scoped>li { font-size: 30px !important; }</style>

## 6 tools for AI-based Islamic research

- **[askansari.ai](https://askansari.ai)** — open source, created by Waleed
- **[usul.ai](http://usul.ai)** — next-generation Shamela
- **[qaf.ai](https://qaf.ai)** — kind of usul v2
- **[aifiqh.com](https://aifiqh.com)** — 24,000+ classical texts
- **[islamify.ai](https://islamify.ai)** — overseen by a scholars' council
- **[dalail.ai](https://dalail.ai)** — Arabic first

---

<!-- slide 154a -->
## askansari.ai

- **Oldest** — on version 3, ~2 years old
- **Widely used** — ~300 conversations per day
- Name = "supporter"
- Strongest on **Qur'an, Hadith, Fiqh**, material preparation
- **A little rusty** — work starting on **Ansari 4**

---

<!-- slide 154b -->
## usul.ai

- A newer AI chat
- **Most comprehensive coverage** of classical texts
- Think of it as **AI-powered Shamela**

---

<!-- slide 154c -->
## qaf.ai

- **Kind of usul v2**
- Researches **8,000+ Islamic books**, answers with citations
- 14 languages · iOS, Android and web

---

<!-- slide 154d -->
## aifiqh.com

- **24,000+ classical texts** and Shariah standards

---

<!-- slide 154e -->
## islamify.ai

- Answers grounded in **Qur'an and Hadith**, sources shown
- **Overseen by a scholars' council** — Ahlus-Sunnah tradition
- No ads, no selling your data

---

<!-- slide 154f -->
## dalail.ai

- **Arabic first**
- A family of assistants for the Islamic sciences: heritage-text search and Qur'anic tafsir today; hadith, fiqh and seerah coming
- Sources: heritage books and verified scholars

---

<!-- slide 155 — the prompt for general AIs (from the JaleesBench companion-prompt article) -->
## A prompt for your general AI

- A tested prompt that makes ChatGPT, Claude or Gemini **support your iman**
- Practical help pointed toward Islamic values
- Steadfast when pushed
- No fabricated citations
- Install it once — instructions for each platform: **[s.iaser.ai/prompt](https://s.iaser.ai/prompt)**

---

## Important: Verifying sources

- Use the right tools
- Use askansari.ai, or usul.ai when searching for hadith
- If using a general AI:
  - Don’t assume that the hadith actually exists unless you’ve verified it
  - Don’t assume the translation of a quran’ic verse is accurate
  - Don’t assume that the reference to a verse is correct

---

<!-- slide 144b -->
## Verifying sources *(continued)*

- Read every word. EVERY. WORD.
  - The worst place to discover an error or issue is on the minbar

**AI is not accountable. You are.**

---

<!-- _class: impact -->

# Session 5 — The Ummah and AI: Preparing the Community

---

<!-- slide 216a -->
## AI will lead to major societal changes

- Upheaval, even. Our community will not be exempt:
- Nature of jobs, employment, labor market
  - “AI won’t replace human workers, but people that use it will replace people that don’t” – Andrew Ng
  - Training programs
- AI “companions” and “friends” - adults and children!
  - Dealing with addiction

---

<!-- slide 216b -->
## Major societal changes *(continued)*

- Students and Education
- Deepfakes
  - Strategy to deal with this as a community
- Akhlaq and interpersonal relationships
  - Ability to form relationships, resolve conflict

---

## Teach your community to fish

- Point them to the **Islamic AIs**: askansari.ai · usul.ai · qaf.ai · aifiqh.com · islamify.ai · dalail.ai
- For the general AIs they already use: the tested prompt that **supports their iman**
- Share it with your community: **[s.iaser.ai/prompt](https://s.iaser.ai/prompt)**

---

<!-- _class: impact -->

# Closing: Q&A & Implementation

---

<!-- slide 234 -->
## Parting thoughts

- Your Q + A
- My Q + A
  - What was the most important thing you learned today?

---

<style scoped>li { font-size: 30px !important; }</style>

## Tonight

- **Rising to the Challenge of AI: Tech Sovereignty, the Ummah, and the Individual**
- **Islamic Center of Long Island**, 835 Brush Hollow Road, Westbury
- **7 PM – 9 PM** · free

---

<!-- _class: title -->
<!-- _paginate: false -->
<!-- _footer: "" -->

<style scoped>li { font-size: 28px !important; } h1 { font-size: 52px !important; }</style>

# s.iaser.ai/azka

![bg right:34% contain](imgs/qr-azka26.png)

- **These slides** · a file **for your AI**
- **askansari.ai**
- **iaser.ai**
- **hi@walee.dk**

---

<!-- _class: impact -->

# Extended Material

*From the full-day AMJA workshop — not covered today*

---

<!-- _class: impact -->

# Deep Dive: Khutbahs & Khatirahs

---

## What You Bring

- The **core message**
- Your **experience** — you've done what no AI can
- Your **understanding of your audience**

---

## Begin with the End in Mind (Niyyah) — The Core Message

- **How do you want people to feel differently after the khutbah?**
- **How do you want people to think differently?**
- **How do you want people to behave differently afterwards?**

---

## What AI Brings

- **Ideas** — and a **sounding board** for yours
- A **research tool**
- A great tool for **amplifying your voice** — audiences, formats, media, languages

---

## What AI Should Not Bring

- **AI cannot have niyyah** — trusting it with the goal, with the message, is disastrous
- *"Give me 10 ideas for videos to increase my views"* — the niyyah is **broken from the beginning**
- Turning 2 bullets into **3 pages** · **deciding the core message** · tailoring into **spam**

**AI is not accountable. You are.**

---

<!-- _class: question -->

# Use AI more to raise the bar, less to save you time.

---

<!-- slide 124 -->
## This is a presentation, so I should use AI, right?

- Wanted to show you how I prepared this presentation
- My conversation with Claude (special version with Ansari integrated)

---

<!-- slide 126 -->
## The prompt I used to prepare this section

- I am giving a seminar on using AI to help with constructing khutbahs and khatirahs. I am talking to Imams at the AMJA national convention.
- I have some ideas about what I want to talk about, but really could do with some help with organizing it. I think two points I want to hit are the importance of checking sources (e.g. usul.ai and askansari.ai) and the power of rich context to customize the khutbah.
- I want it to be extremely practical. I can give live demos. I am pretty experienced with AI.

---

<!-- slide 128a -->
## Context: Audience, me, style

> I am giving a seminar on using AI to help with constructing khutbahs and khatirahs. I am talking to Imams at the AMJA national convention. I have ideas but could use help organizing it. I want it to be **extremely practical**. I can give live demos. I'm experienced with AI.

**My starting ideas:**
- Ideation, importance of context, making it yours

---

<!-- slide 128b -->
## Context: Audience, me, style *(continued)*

> The ideas I have:
> - **Ideation** — using AI to find topics (e.g. time-of-year events)
> - **Context** — audience, world events, local community
> - **Making it yours** — your style, your khutbah format
>
> I'd love your feedback. Make sure to consult Ansari, since this is an Islamic topic.

---

<!-- slide 130 -->
## AI doesn't replace you. It makes your khutbah better.

- Option 1: “Write a khutbah about patience”
- I have asked it and shown it as a demonstration
- One person told me “probably better than 50 per cent of khutbahs I’ve heard” — https://askansari.ai/share/68abfa28ec0b4b07eb7af7fc

---

<!-- slide 132a -->
## Customizing for your audience — Option 2

**Situational khutbah prompt:**

> I am an imam in our community. Our community had **floods last week**. Many are stressed and have lost their houses.
>
> I need to give a khutbah focusing on **patience** for those who lost homes, and the **duty of the rest of the community** to support them.

---

<!-- slide 132b -->
## Customizing for your audience *(continued)*

> Looking for inspirational stories. Call to action: support, fundraising, patience.
>
> Use **Ansari**; feel free to search the web for AUTHENTIC information.

*Followed by back-and-forth on stories and balance — Claude + Ansari.*

---

<!-- slide 134 -->
## Which do you think will result in a better khutbah?

- Second has much better context
- Has it using AI for ideation and knowledge
- Second one has clear call to action — the jama'ah **behaves differently** (Niyyah)
- It ties to what just happened — that lands harder.
- The imam went back and forth until it felt right.

---

<!-- slide 136 -->
## Context is critical

- Don’t focus on prompts – how do I phrase the request.
- Focus on context
  - Information that helps the AI make better decisions
- Key examples of context
  - The audience
  - Recent events in the community
  - Recent events in the news
  - Time of year (AIs are not good at time generally)
  - Previous talks
  - Your relationship with the audience

---

<!-- slide 138 -->
## Claude’s template for context

- "My audience is: [demographics]
- Current local issue: [what's happening]
- Community makeup: [converts/born Muslims/youth percentage]
- Recent khutbahs covered: [avoid repetition]
- Speaking style needed: [academic/conversational/mixed]"

---

<!-- slide 140 -->
## Using AI for ideation

- Can come up with topics in a series
  - Example: Juz highlights – pick one verse from every chapter
- Can come up with stories or hadith to reinforce a particular theme
- Can work to your limits: how long, how many sessions

---

<!-- slide 142a -->
## Making it yours — Your style

- Your style
  - You can teach AI your style by giving it samples
  - Example: I gave Claude 4 of my articles and asked it to summarize my style
  - Then when you ask it to generate a khutbah, include its summary and say “this is my style”

---

<!-- slide 142b -->
## Making it yours — Your khutbah format

- How you like to give khutbahs
  - Example:
    - Start with a story that really leaves an impact
    - Then substantiate with Qur’an and Sunnah
    - Then the second khutbah I always focus on 3 calls to action

---

<!-- slide 144a -->
## Important: Verifying sources

- Use the right tools
- Use askansari.ai, or usul.ai when searching for hadith
- If using a general AI:
  - Don’t assume that the hadith actually exists unless you’ve verified it
  - Don’t assume the translation of a quran’ic verse is accurate
  - Don’t assume that the reference to a verse is correct

---

<!-- slide 144b -->
## Verifying sources *(continued)*

- Read every word. EVERY. WORD.
  - The worst place to discover an error or issue is on the minbar

**AI is not accountable. You are.**

---

<!-- slide 146 -->
## Live Demo

- Audience: suggest a topic for a khatirah / khutbah
- What is the context

---

<!-- _class: impact -->

# Deep Dive: Research

---

<!-- slide 150 -->
## Doing Research + Answering Others’ Questions

- Many of you research topics you care about.
- And your community asks you a lot of questions.
- How can we use AI to help do both of these things?

---

<!-- slide 152 -->
## AI is an extremely powerful research tool

- Ability to process information is huge
- It can search your own documents in seconds.

---

<!-- _class: impact -->

# Ansari — A Case Study

---

<!-- mit26 Part 2 — Ansari case study -->
## A Different Perspective

- Most talk about AI and the family is about the **harm**
- Today: **a positive case study**
- AI used to **deepen** religious practice, not undermine it

---

## What is Ansari?

- **askansari.ai** — started June 2023
- Over **140,000 conversations** to date
- AI assistant for learning about Islam
- Grounded in authentic Islamic sources
- Web, iOS, Android, WhatsApp

**The Name**
- "Ansar" (أنصار) = "helpers" in Arabic
- Specifically: the People of Madinah who welcomed the Prophet Muhammad as a refugee
- Ansari = a helper for people seeking to understand Islam

---

## The Numbers

- **~290/day** average (peak: 450/day in Feb–Mar 2026)
- **25+ languages**
- **84% positive** satisfaction
- **65%** of answers cite primary sources

---

## Growth

![width:1100px](imgs/threads-per-week.png)

---

## How People Use Ansari

*Based on a random sample of 10,000 conversations*

1. **Understanding** (42.9%) — Quran, Hadith, history, theology, language
2. **Practice** (37.5%) — fiqh rulings, halal/haram, ethics in modern life
3. **Content Prep** (9.8%) — sermons, lesson plans, trivia, youth activities
4. **Support** (3.6%) — grief, anxiety, loneliness, life crises
5. **Misc** (6.2%) — off-topic, greetings, feedback

---

## Understanding (42.9%)

**The biggest category: learning about Islam**

- "Explain Surah Fatiha to children aged 10–12 years old"
- "Hadith about tawakkul (trust in God) — like a bird"
- "How to answer these questions for kids: 'Where does Allah live?', 'Do non-Muslims go to hell?'"
- "List all the stories of Prophet Musa from the Quran in order with lessons"
- "Why doesn't Allah increase my iman (faith)?"

---

## Practice (37.5%)

**Applying Islam to daily life**

- "There is a platter of sandwiches here. Egg, prawn, but also ham. Can I eat the prawn/egg from the same platter?"
- "Can I go to the dentist and take anesthesia during fasting?"
- "Is it Islamically okay to get answers for your fiqh questions from a chatbot?"
- "How does one motivate their teenage students who proudly say that they don't pray?"
- People use it during pilgrimages (Hajj/Umrah) for real-time guidance, including me

---

## Content Prep (9.8%)

**Imams and teachers as power users**

- "I need a khutbah that focuses on love for one another as a means of healing a divided community"
- "Teach students aged 12–16 about hadith and Imam Bukhari's legacy. Create a 2-hour lesson"
- "I am 9 years old. Please ask me 10 quiz questions about Islam"
- "Help me write an Instagram post about the 5 most beloved deeds to Allah"

---

## Support (3.6%)

**Small in numbers. Powerful in impact.**

- "Please, what can I do for a Muslim sister going through depression?"
- "Remind me of all the benefits of hosting"
- "Give me 3 reasons why Allah blesses those who are patient and persevere"
- Me, 2am, kids kept me awake all night: *"Man that was rough."* Ansari responded with exactly the right verses

---

## Feedback Given Through the UI

1,914 total entries. **85.5% positive**, 11.8% negative, **2.7% red flag** (28 cases).

Red flags include:
- **Quran meaning inverted** — said "Allah forbade trade and permitted usury" (opposite of 2:275)
- **Offensive inference** — assumed user lacked sincerity based on question
- **Wrong dates** — gave 2025 Ramadan dates when asked in 2026

Most negative feedback: stuck/loops (~15), incorrect info (~12), didn't answer (~8)

---

<style scoped>li { font-size: 26px !important; } p { font-size: 30px !important; }</style>

## The System Prompt (aka SOUL.md)

The instruction that shapes Ansari's behavior:

- **Identity**: multilingual Islamic assistant, Sunni tradition
- **Sources**: only cite Quran, Hadith, and Fiqh Encyclopedia from search results
- **Attribution**: never attribute statements to scholars without specific evidence
- **Hadith caution**: only use Hadith found in search results; if unsure, say so
- **Controversial topics**: present main positions objectively, highlight consensus first, don't declare one position correct when legitimate disagreement exists
- **Obligatory/prohibited matters**: must be backed by direct evidence

---

## 10,000 Personalities

An expert in the field described it this way:

> *"There are 10,000 personalities living inside those 500 billion parameters. The system prompt is how you choose which one it is."*

The system prompt defines the **"soul"**.

---

## Validation: Three Approaches

1. **BATIK** — 100 multiple-choice questions from real user queries
   - GPT-3.5: 77% → GPT-4: 95% → **Ansari v3: 100%**
2. **Dar ul Qasim Exams** (Chicago Islamic institute, zero-shot)
   - Intro to Quran: **80%**
   - Theology exam: **78%**
3. **Ramadan Validation** (34 questions, human-rated 1–5)
   - Overall: **4.41/5** — 100% helpful, 0 hallucinations, 82% used references

---

## New: Benchmarks!

![h:560px](imgs/leaderboard.jpg)

---

## What's Next: Keeping People Coming Back

**Two audiences:**
- **Specialists** (imams, teachers): daily users, loyal
- **Average Muslims**: come once, leave

**Strategy**: don't wait for them to come to Ansari.
- **Ansari Skill**: available inside Claude, ChatGPT — no separate app needed
- **A short lesson each day**, at your level
- Not just answering — proactively teaching

---

## Conclusions — Ansari Case Study

- People **do** use AI to practise and understand their deen better
- You can define the **"soul" of an AI** through the system prompt
- With RAG, you can build systems that **rarely if ever hallucinate**
- 140K+ conversations prove the demand is real

---

<!-- _class: impact -->

# Preparing the Community for AI — More

---

<!-- slide 211a -->
## Using AI in the Community — Communications

- Auto-translated newsletters, khutab, social media posts
  - Reach underserved sub-communities
  - Summarized or targeted posts to different age groups (e.g. emphasizing programs for teens)
  - Simultaneously generate a press release for event, a WhatsApp message, an Instagram post
- Reaching out to different age groups and demographics

---

<!-- slide 211b -->
## Using AI in the Community — Programs & Activism

- Activity design: workshops, summer programs, long-running halaqa
- Community activism
  - Organizing and repetitive admin work (emails, announcements, reminders, newsletters, or program outlines)

---

<!-- slide 219 -->
## Data and Privacy

- Data is digital gold
- “If you don’t pay for the product, you are the product”
  - Find a company (e.g. Proton, Kagi, Brave) that has privacy in terms of service. Even better, one that doesn’t store your data at all.
- Temporary Mode on ChatGPT, Incognito mode for Gemini
- Advanced option: Self-host an LLM

---

<!-- _class: impact -->

# Advanced Techniques

---

<!-- slide 223 -->
## Agent Skills

- Skills teach your AI to do new things
- • Skills = plug-in tools that give AI new abilities
- • Example: Add Ansari as a skill to Claude or ChatGPT
- → Now your AI can answer Islamic questions with sources
- • Other examples: web search, calculator, code execution
- • Think of it like apps on your phone — each one adds a new power

---

<!-- slide 224 — companion prompt callback (s.iaser.ai/prompt) -->
## The prompt for your general AI

- From the research session: the tested prompt that makes your general AI **support your iman**
- The simplest install there is — one paste, per-platform instructions
- **[s.iaser.ai/prompt](https://s.iaser.ai/prompt)** — install it now

---

<!-- slide 224b — the Claude ladder -->
## Claude → Cowork → Code

- **claude.ai** — chat: ask, draft, discuss
- **Claude Cowork** — "Claude Code without the code": agentic, multi-step work on your files and documents (all paid plans)
- **Claude Code** — the most powerful AI engine today, not just for code (learning curve)

---

<!-- slide 224c — Gemini Spark -->
## Gemini Spark

- Google's **24/7 personal agent** — keeps working in the background, even with your laptop closed
- Deeply integrated with **Gmail, Docs and Slides**; handles recurring tasks
- Google AI Ultra subscribers

---

<!-- slide 231a -->
## Agentic revolution — What agents are

- Agents are AI that are continually running
  - They Reflect: Am I working well?
  - They Plan: How do I accomplish this goal?
  - They use tools: Search is one tool but what other ways can it interact with the world?
  - They talk to one another

---

<!-- slide 225 -->
## App Building: Level 1 — Artifacts

- Claude and Gemini can generate interactive apps in chat
- • Describe what you want → get a working app instantly
- • Great for: calculators, quizzes, simple tools
- • Easy to iterate — just ask for changes

---

<!-- slide 227 -->
## App Building: Level 2 — Replit

- AI-powered development for full applications
- • Describe your app in plain English → Replit builds it
- • Deploy to the web with one click
- • No coding required

---

