علا صالح Jazak Allah khayr, kind of you to ask. Two parts:
1) Chunking. We deliberately avoided blind fixed-size chunking. The retrieval unit is the ayah, or the ayah-range where the mufassir himself grouped verses (al-Razi, or al-Biqaʿi in Nazm al-Durar). Each entry stores ayah_start/ayah_end, so a query for any verse inside a range still resolves to it. Only when a single ayah's commentary is very long (>4000 chars) do we sub-split it, and even then on sentence boundaries with overlap, never mid-sentence. Each chunk is embedded with a contextual title (Surah:Ayah — scholar) so it keeps its anchor. So: the mufassir's own unit of thought first, size-based splitting only as a fallback.
2) Lenses. It's metadata, not prompt-guessing. Every book carries a lens_affinity tag set at ingestion, and retrieval hard-filters on it, so with the Wording lens on, the store only ever returns the linguistic/rhetorical mufassirin (Ibn Ashur, al-Zamakhshari's Kashshaf for balagha, al-Jalalayn, al-Jadwal for iʿrab), never the fiqh or seerah works. The lens scope is guaranteed by the tag before the prompt ever runs. For the overview layer we don't even run a semantic search: we deterministically pull every chunk of the lens's scholars for that ayah and feed each voice in full, so no scholar is silently dropped. For the deep-dive chat we retrieve on the user's actual question (we recently measured that searching on the question beats a synthetic domain query, so we dropped the latter).
One honest nuance: tagging is currently at the book/scholar level (matching each mufassir's methodology to the lens it serves), not per-paragraph topic classification. That finer pass is on our roadmap.