0Pricing
Vector Databases: Pinecone, Weaviate & pgvector · レッスン

Vectorizerモジュールと自動Embedding

WeaviateのVectorizerモジュールがインポート時にデータオブジェクトを自動でベクトルへ変換する仕組みと、クラスやプロパティごとの設定方法を学びます。

「Vectorizerモジュールと自動Embedding」はCoddyKit上の無料Vector Databases: Pinecone, Weaviate & pgvectorレッスンです。 これはレッスン4/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これは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モジュールと自動Embedding」レッスンは無料ですか?

はい。「Vectorizerモジュールと自動Embedding」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Vector Databases: Pinecone, Weaviate & pgvectorコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Vector Databases: Pinecone, Weaviate & pgvectorコースには全4レッスンが含まれています。

「Vectorizerモジュールと自動Embedding」で何を学びますか?

WeaviateのVectorizerモジュールがインポート時にデータオブジェクトを自動でベクトルへ変換する仕組みと、クラスやプロパティごとの設定方法を学びます。 ブラウザで直接実行するハンズオンコードでVector Databases: Pinecone, Weaviate & pgvectorを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

Vector Databases: Pinecone, Weaviate & pgvectorを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのVector Databases: Pinecone, Weaviate & pgvectorは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン4/4です。

「Vectorizerモジュールと自動Embedding」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このVector Databases: Pinecone, Weaviate & pgvectorレッスンでコードを書いて実行できますか?

はい。すべてのVector Databases: Pinecone, Weaviate & pgvectorレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. Weaviateスキーマの定義
  2. データオブジェクトのインポート
  3. Weaviate GraphQLクエリ
  4. Vectorizerモジュールと自動Embedding
← Vector Databases: Pinecone, Weaviate & pgvectorに戻る