Scrapeless Wiki

What Is Weaviate? – Definition and How It Works

Informational P2 what is weaviate

Learn what Weaviate is, how its schema and built-in vectorisers work, and when module-based embedding helps or hurts.

Weaviate is a vector database with a defined schema, a GraphQL query interface, and optional built-in vectorisers that embed your data for you.

1. Schema-First, Unlike Most Vector Stores

Weaviate wants a collection definition up front β€” properties with types, and a vectoriser choice:

import weaviate.classes.config as wc

client.collections.create(
    "Chunk",
    vectorizer_config=wc.Configure.Vectorizer.none(),   # bring your own vectors
    properties=[
        wc.Property(name="content",   data_type=wc.DataType.TEXT),
        wc.Property(name="sourceUrl", data_type=wc.DataType.TEXT),
        wc.Property(name="heading",   data_type=wc.DataType.TEXT),
        wc.Property(name="lang",      data_type=wc.DataType.TEXT),
        wc.Property(name="fetchedAt", data_type=wc.DataType.DATE),
    ],
)

The typed schema buys validation and predictable filtering, at the cost of a migration when the shape changes β€” the same trade a relational database makes.

2. Built-In Vectorisers

Weaviate's most distinctive feature: modules that embed text on ingest and at query time, so you send text rather than vectors.

The appeal β€” no embedding code, no dimension mismatches, query by text directly.

The cost β€” the database holds a credential for the embedding provider, the module's model version becomes part of your infrastructure, and switching models means reindexing through Weaviate rather than in your own pipeline.

For a collection pipeline that already computes embeddings for other purposes, Vectorizer.none() and supplying your own vectors is usually cleaner: it keeps the model choice, the credential, and the batching in code you control.

3. Hybrid Search Built In

results = chunks.query.hybrid(
    query="how do I stop getting blocked",
    alpha=0.5,                     # 0 = pure keyword, 1 = pure vector
    limit=10,
)

alpha blends BM25 and vector scores in one call. That is genuinely convenient β€” the alternative is running two searches and fusing ranks yourself.

Worth tuning rather than leaving at the default: queries containing exact identifiers want a lower alpha, conceptual questions want a higher one.

4. Filtering and References

Filters work on schema properties with the expected operators. Weaviate also supports cross-references between collections, which is closer to a graph model than most vector databases offer β€” a chunk can point at its source document as a real reference rather than a copied field.

Useful when the corpus has genuine structure; unnecessary weight when it does not.

5. Multi-Tenancy

Weaviate has first-class multi-tenancy, with each tenant's data isolated inside a collection. For a product serving many customers from one index this is a real feature rather than something to build.

6. Compared With the Alternatives

Option Distinctive strength
Weaviate Schema, built-in vectorisers, hybrid in one call, multi-tenancy
Qdrant Filtering during traversal, sparse vectors, lighter to run
pgvector SQL joins and filters, one system
FAISS No infrastructure, single process

7. Operational Notes

  • Persist the volume, or a container restart loses everything.
  • Decide vectoriser policy early. Switching between module-vectorised and self-vectorised means reindexing.
  • Batch imports with the batching helper; single inserts are slow.
  • Watch module credentials β€” if a vectoriser module holds an API key, that key lives in the database's configuration and must be managed as a secret there.
  • Schema changes need care, as with any typed store.

8. Summary

Weaviate is a schema-first vector database with GraphQL access, cross-references, multi-tenancy, and hybrid search available through a single alpha parameter.

Its built-in vectorisers remove embedding code at the cost of putting a provider credential and a model version inside your database β€” so for a pipeline that already produces embeddings, supplying your own vectors keeps that control in code, while the hybrid query and multi-tenancy remain the reasons to choose it.