0Pricing
Vector Databases: Pinecone, Weaviate & pgvector · درس

وحدات Vectorizer والتضمين التلقائي

تعلّم كيف تحوّل وحدات Vectorizer في Weaviate كائنات بياناتك تلقائيًا إلى متجهات أثناء الاستيراد، وكيفية إعدادها لكل فئة وخاصية.

وحدات Vectorizer والتضمين التلقائي درس مجاني في Vector Databases: Pinecone, Weaviate & pgvector على CoddyKit. هذا هو الدرس 4 من أصل 4. يمكنك قراءة الدرس كاملاً أدناه مجاناً — ثم تمرن عليه مباشرة في المتصفح باستخدام محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7. هذا الدرس جزء من مسار التعلم في Vector Databases: Pinecone, Weaviate & pgvector، وتقدمك يتزامن عبر الويب وتطبيق CoddyKit. تتضمن دورة Vector Databases: Pinecone, Weaviate & pgvector 4 دروس في المجموع.

بعض أجزاء هذا الدرس لم تُترجم بعد وتظهر باللغة الإنجليزية.

Who Creates the Vectors?

Vector search needs every object to have a vector. You can compute embeddings yourself, or let Weaviate do it via a vectorizer module that embeds objects automatically on import.

What Is a Vectorizer Module?

A vectorizer is a pluggable module (e.g. text2vec-openai, text2vec-cohere, text2vec-huggingface) that Weaviate calls to convert text into vectors. You choose it when defining a class.

Configuring a Vectorizer

The vectorizer is set in the class schema.

class_def = {
  'class': 'Article',
  'vectorizer': 'text2vec-openai',
  'properties': [
    {'name': 'title', 'dataType': ['text']},
    {'name': 'body', 'dataType': ['text']}
  ]
}
print(class_def['vectorizer'])

Auto-Embedding on Import

With a vectorizer set, you import plain objects and Weaviate embeds them for you. No need to call an embedding API yourself.

  • Send object properties
  • Module generates the vector
  • Object stored with its vector

Choosing Which Properties to Embed

Not every property should influence the vector. You can skip properties (like IDs or timestamps) so only meaningful text contributes to the embedding.

prop = {
  'name': 'sku',
  'dataType': ['text'],
  'moduleConfig': {'text2vec-openai': {'skip': True}}
}
print('skip embedding:', prop['moduleConfig']['text2vec-openai']['skip'])

Including Property Names

By default Weaviate can prepend the property name to its value before embedding. Disabling 'vectorizePropertyName' keeps the vector focused on content rather than field labels.

Bring Your Own Vectors

You can also set vectorizer to 'none' and supply precomputed vectors at import. Useful when you already run a custom embedding pipeline or need a model Weaviate does not host.

Module Configuration

Each vectorizer accepts options in moduleConfig, such as the model name or dimensions. Set them at the class level to control how embeddings are produced.

module_config = {
  'text2vec-openai': {'model': 'text-embedding-3-small', 'type': 'text'}
}
print(module_config['text2vec-openai']['model'])

Consistency at Query Time

The same vectorizer embeds your query so it lives in the same space as stored objects. This is why mixing models or changing the vectorizer after import breaks search consistency.

Auto vs Manual Trade-offs

When to use each:

  • Auto-embedding — simplest, less code, Weaviate manages calls
  • Manual vectors — full control, custom models, batch pre-processing

Putting It Together

Pick a vectorizer per class, skip irrelevant properties, configure the model, and let Weaviate auto-embed on import. Or set 'none' to bring your own vectors. Keep the vectorizer consistent between import and query.

Quick Check

Test your understanding of vectorizers.

Recap

You learned that Weaviate vectorizer modules auto-embed objects on import. Configure the module per class, skip non-meaningful properties, set the model in moduleConfig, or use 'none' to bring your own vectors. Keep the vectorizer consistent between import and query for valid search.

الأسئلة الشائعة

هل درس «وحدات Vectorizer والتضمين التلقائي» مجاني؟

نعم — نص درس «وحدات Vectorizer والتضمين التلقائي» كامل متاح مجاناً هنا على الويب. لتمرينه بشكل تفاعلي (محرر أكواد مدمج ومدرس ذكاء اصطناعي متاح 24/7) وفتح باقي دورة Vector Databases: Pinecone, Weaviate & pgvector، انتقل إلى CoddyKit PRO. تتضمن دورة Vector Databases: Pinecone, Weaviate & pgvector 4 دروس في المجموع.

ماذا ستتعلم في «وحدات Vectorizer والتضمين التلقائي»؟

تعلّم كيف تحوّل وحدات Vectorizer في Weaviate كائنات بياناتك تلقائيًا إلى متجهات أثناء الاستيراد، وكيفية إعدادها لكل فئة وخاصية. تتمرن على Vector Databases: Pinecone, Weaviate & pgvector مع أكواد عملية تشغلها مباشرة في المتصفح، ومدرس ذكاء اصطناعي متاح 24/7 يجيب على أسئلتك أثناء عملك.

هل أحتاج إلى خبرة سابقة لأبدأ Vector Databases: Pinecone, Weaviate & pgvector؟

لا تُشترط خبرة سابقة. Vector Databases: Pinecone, Weaviate & pgvector على CoddyKit منظم للمبتدئين حتى المتقدمين، لذا يمكنك البدء من هنا أو من البداية والتقدم بسرعتك الخاصة. هذا هو الدرس 4 من أصل 4.

كم من الوقت يستغرق درس «وحدات Vectorizer والتضمين التلقائي»؟

معظم دروس CoddyKit تستغرق حوالي 5–10 دقائق. كل منها موجز وتفاعلي، لذا تحرز تقدماً مستمراً وتستأنف من حيث توقفت عبر الويب والتطبيق.

هل يمكنني كتابة وتشغيل أكواد في درس Vector Databases: Pinecone, Weaviate & pgvector هذا؟

نعم. كل درس في Vector Databases: Pinecone, Weaviate & pgvector يتضمن محرر أكواد مدمج، لذا تكتب وتشغل أكواداً حقيقية مباشرة في متصفحك وتحصل على تعليقات فورية من الذكاء الاصطناعي — بدون إعداد محلي.

جميع الدروس في هذه الدورة

  1. تعريف مخطط Weaviate
  2. استيراد كائنات البيانات
  3. استعلامات GraphQL في Weaviate
  4. وحدات Vectorizer والتضمين التلقائي
← العودة إلى Vector Databases: Pinecone, Weaviate & pgvector