البحث الهجين: الكلمات المفتاحية مع المتجهات
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
combine full-text and vector search and say when each wins.
الموضوعات المخطط لها
- Vectors win on meaning and paraphrase ("my package is late").
- Keywords win on exact terms: order numbers, SKUs, error codes, names.
- Hybrid: run both, then merge the rankings. Reciprocal Rank Fusion (RRF) merges by rank, so scores need no common scale.
- PostgreSQL does both:
tsvectorwith a GIN index plus pgvector. - Test with real questions; do not assume hybrid is always better.
تفاصيل المخطط المبدئي
عرض عملي
two ranked lists merged: RRF score = sum of 1 / (k + rank) per list (k = 60 is a common constant). An article ranked 1st in text and 3rd in vector beats one ranked 1st in only one list.
اختبر فهمك
Which search finds the order id "ORD-88231"?
أظهر الإجابة
Keyword search; vectors do not match exact codes reliably.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.