Dữ liệu cho AI★ ~17 nghìn sao GitHubXem giấy phép trong repo

Weaviate là vector database viết bằng Go, mạnh ở việc tự tạo embedding ngay lúc nhập dữ liệu và gộp tìm kiếm ngữ nghĩa, từ khoá, RAG trong cùng một giao diện truy vấn.

Weaviate là cơ sở dữ liệu vector cloud-native, lưu cả đối tượng và vector, cho phép tìm kiếm ngữ nghĩa ở quy mô lớn. Nó kết hợp tìm kiếm tương đồng vector với lọc từ khoá, RAG và reranking trong một giao diện truy vấn duy nhất.

Có hai cách lưu vector: tự động vector hoá khi nhập bằng các model tích hợp (OpenAI, Cohere, HuggingFace…) hoặc nhập embedding tính sẵn. Ví dụ trong README dùng Docker Compose chạy Weaviate kèm model nhẹ Model2Vec để tạo vector ngay trên máy, rồi dùng client Python để tạo collection, chèn dữ liệu và tìm theo ngữ nghĩa.

Weaviate có client Python, JavaScript/TypeScript, Java, Go, C#/.NET, cùng REST, gRPC, GraphQL API. Các tính năng sản xuất gồm mở rộng ngang, multi-tenancy, nén vector để giảm bộ nhớ, TTL tự xoá dữ liệu cũ. Có bộ Agent Skills giúp Claude Code, Cursor, Copilot làm việc chính xác hơn với Weaviate.

Điểm nổi bật

Ứng dụng trong công việc

Phù hợp với ai

Kỹ sư backend và AI cần vector database đầy đủ tính năng, tự host hoặc dùng Weaviate Cloud.

Cài đặt

docker compose up -d
pip install -U weaviate-client

Trước tiên tạo tệp docker-compose.yml theo mẫu trong README (Weaviate kèm dịch vụ embedding Model2Vec), rồi chạy lệnh trên. Có thể triển khai bằng Kubernetes hoặc dùng Weaviate Cloud. Model embedding của OpenAI, Cohere cần API key tương ứng.

Hướng dẫn sử dụng

1. Tệp docker-compose.yml mẫu

Chạy Weaviate cùng model embedding nhẹ trên máy.

services:
  weaviate:
    image: cr.weaviate.io/semitechnologies/weaviate:1.36.0
    ports:
      - "8080:8080"
      - "50051:50051"
    environment:
      ENABLE_MODULES: text2vec-model2vec
      MODEL2VEC_INFERENCE_API: http://text2vec-model2vec:8080
  text2vec-model2vec:
    image: cr.weaviate.io/semitechnologies/model2vec-inference:minishlab-potion-base-32M
2. Tạo collection, nhập dữ liệu và tìm kiếm

Ví dụ rút gọn từ README.

import weaviate
from weaviate.classes.config import Configure, DataType, Property

client = weaviate.connect_to_local()
client.collections.create(
    name="Article",
    properties=[Property(name="content", data_type=DataType.TEXT)],
    vector_config=Configure.Vectors.text2vec_model2vec(),
)
articles = client.collections.get("Article")
articles.data.insert_many([{"content": "Vector databases enable semantic search"}])
results = articles.query.near_text(query="Search objects by meaning", limit=1)
print(results.objects[0])
client.close()
3. Cài Agent Skills

Giúp trợ lý lập trình AI làm việc với Weaviate chính xác hơn.

npx skills add weaviate/agent-skills

Lưu ý

Repo gốc: github.com/weaviate/weaviate · Bản quyền thuộc tác giả dự án. Mô tả tiếng Việt do MochiStudio biên soạn để tham khảo — số sao và giấy phép ghi nhận tại thời điểm biên soạn.