استراتيجيات التقطيع
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
split documents into chunks that retrieve well.
الموضوعات المخطط لها
- Chunk: the unit you embed and retrieve. Too large drowns the answer and wastes tokens; too small loses context.
- Start with structure: split by headings and paragraphs, then by size (a few hundred tokens is a common start; tune by measurement).
- Overlap a little so a sentence at a boundary is not cut off.
- Metadata per chunk: article id, title, section, language, product, audience, updated time.
- Keep the article id so one article can be re-indexed alone.
تفاصيل المخطط المبدئي
عرض عملي
a returns policy article split into "Eligibility", "Deadlines", "Refund method" chunks, each carrying {articleId: 42, lang: "en", section: "Deadlines"}.
اختبر فهمك
Why keep the article id on every chunk?
أظهر الإجابة
To cite the source and to replace only that article's chunks on change.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.