الاسترجاع والمرشّحات وإعادة الترتيب
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
retrieve the right chunks using filters and optional re-ranking.
الموضوعات المخطط لها
- Filter by metadata before or during the vector search: language, product, customer tier. A wrong-language chunk is a wrong answer.
- Fetch more candidates than needed (for example 20), then keep the best few.
- Re-ranking: a second model scores query-chunk pairs and reorders candidates; better quality, extra latency and cost.
- Set a minimum similarity threshold: weak matches should count as "nothing found".
- Hybrid search (MID-067) helps with exact terms such as order or policy codes.
تفاصيل المخطط المبدئي
عرض عملي
pipeline: filter lang = 'ar' AND audience = 'customer' → top 20 by vector/hybrid → optional re-rank → top 4 above threshold.
اختبر فهمك
Why a similarity threshold?
أظهر الإجابة
So weak matches lead to "I don't know" instead of a made-up answer.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.