Files
MathApp/data/textbooks/README.md
Zareian 52d9694583 keep ingested chunks findable and structured
Two bugs made self-ingested content useless, both silently:

- _payload wrote `chapter_number` (int) while math retrieval filters on
  `chapter` (the full "فصل ۲: کسر" string), so anything we ingest could
  never match a search — no error, just permanently invisible content.
- ingest_pdf flattened the vision extraction into one text blob and threw
  away type/keywords/generalSolution/problem/solution. LessonChunk is the
  source of truth, so rebuilding meant paying for vision again — and the
  problem/solution pairs are the input for building lesson questions.

LessonChunk now stores those fields and _payload emits them under the same
keys the other team's collections use, so ours and theirs stay one shape.

Also fixes a regression from the whitenoise commit: the Manifest storage
variant raises when staticfiles.json is absent, which broke all 23 admin
rendering tests (Django forces DEBUG=False in tests, so USE_FINDERS is off)
and would have taken the admin panel down entirely the day DEBUG=0 ships
without a collectstatic run.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 16:24:18 +03:30

1.5 KiB
Raw Blame History

کتاب‌های درسی (PDF)

فایل‌های PDF کتاب‌های درسی را در همین پوشه بگذارید. خودِ PDFها در گیت ذخیره نمی‌شوند (حجمشان زیاد است) — فقط همین فایل راهنما ردیابی می‌شود.

منبع

نسخه‌ی رسمی و به‌روزِ کتاب‌ها: https://irtextbook.ir (از خارج ایران در دسترس نیست؛ دانلود باید از داخل ایران انجام شود.)

نام‌گذاری پیشنهادی

math-grade1.pdf     ریاضی اول دبستان
math-grade2.pdf     ریاضی دوم دبستان
math-grade4.pdf     ریاضی چهارم دبستان
math-grade5.pdf     ریاضی پنجم دبستان

پایه‌های سوم و ششم لازم نیستند: محتوایشان از قبل روی Qdrant موجود است (collectionهای «ریاضی سوم» و «ریاضی ششم» ساخته‌ی تیم دیگر).

بعدش چه اتفاقی می‌افتد

هر صفحه به تصویر تبدیل می‌شود، مدل vision انواع مسئله را استخراج می‌کند (type / keywords / generalSolution / problem / solution)، نتیجه هم در جدول rag.LessonChunk (منبع حقیقت، پیش خودمان) ذخیره می‌شود و هم به‌صورت نقطه در Qdrant ایندکس می‌شود — با همان قرارداد payloadی که تیم دیگر دارد.