0Pricing
Vector Databases: Pinecone, Weaviate & pgvector · Урок

Модули векторизации и автоматическое создание эмбеддингов

Узнайте, как модули векторизации Weaviate автоматически преобразуют объекты данных в векторы во время импорта и как настраивать их для каждого класса и свойства.

«Модули векторизации и автоматическое создание эмбеддингов» — бесплатный урок 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.

Часто задаваемые вопросы

Урок «Модули векторизации и автоматическое создание эмбеддингов» бесплатный?

Да — полный текст урока «Модули векторизации и автоматическое создание эмбеддингов» бесплатно доступен здесь в веб-версии. Чтобы практиковать его интерактивно (встроенный редактор кода и ИИ-репетитор 24/7) и разблокировать остальной курс Vector Databases: Pinecone, Weaviate & pgvector, подпишись на CoddyKit PRO. Курс Vector Databases: Pinecone, Weaviate & pgvector содержит 4 уроков всего.

Чему я научусь в уроке «Модули векторизации и автоматическое создание эмбеддингов»?

Узнайте, как модули векторизации Weaviate автоматически преобразуют объекты данных в векторы во время импорта и как настраивать их для каждого класса и свойства. Ты практикуешь Vector Databases: Pinecone, Weaviate & pgvector с помощью реального кода, который запускаешь прямо в браузере, и ИИ-репетитор 24/7 отвечает на твои вопросы во время урока.

Нужен ли мне опыт, чтобы начать Vector Databases: Pinecone, Weaviate & pgvector?

Предыдущий опыт не требуется. Vector Databases: Pinecone, Weaviate & pgvector на CoddyKit структурирован для всех уровней — от новичков до продвинутых, поэтому ты можешь начать отсюда или с самого начала и учиться в своем темпе. Это урок 4 из 4.

Сколько времени занимает урок «Модули векторизации и автоматическое создание эмбеддингов»?

Большинство уроков CoddyKit занимают около 5–10 минут. Каждый из них компактный и интерактивный, поэтому ты постоянно делаешь прогресс и продолжаешь с того же места в веб-версии и приложении.

Можно ли писать и запускать код в этом уроке Vector Databases: Pinecone, Weaviate & pgvector?

Да. Каждый урок Vector Databases: Pinecone, Weaviate & pgvector включает встроенный редактор кода, поэтому ты пишешь и запускаешь реальный код прямо в браузере и получаешь моментальную обратную связь от AI — локальная установка не требуется.

Все уроки этого курса

  1. Определение схемы Weaviate
  2. Импорт объектов данных
  3. Запросы GraphQL в Weaviate
  4. Модули векторизации и автоматическое создание эмбеддингов
← Назад к Vector Databases: Pinecone, Weaviate & pgvector