Weaviate
AI-native, high-performance, open-source vector database.
Weaviate is a high-performance, AI-native, open-source vector database optimized for AI-powered applications and large language model (LLM) workflows. Beyond a simple index for vector math calculations, it stores and manages raw data objects along with their corresponding high-dimensional embedding vectors, functioning as a complete database.
This database automatically performs vector transformation (Auto-schema and automatic vectorization) through configured machine learning modules when data is ingested, significantly reducing the complexity of machine learning pipelines. It also fully supports hybrid search, which combines dense vector search with BM25, a traditional keyword search method, to maximize the accuracy of search results.
From a biotechnology and biomedical research perspective, Weaviate is a valuable tool. Data in the bio field, such as protein 3D structures, gene expression profiles, biochemical drug formulas, and clinical medical records of numerous patients, is high-dimensional and unstructured. By vector embedding this data using transformer models and storing it in Weaviate, you can explore the similarity of molecular structures or the relevance of clinical contexts at near real-time speeds. In particular, it can be securely deployed and operated on a closed network (On-Premise) without exposing sensitive patient information or proprietary drug intellectual property (IP) to external clouds, making it an ideal alternative for healthcare research labs and biotech companies where data privacy is paramount.
โก Installation
4-1. Quick Start
This is a basic method for quickly running a Weaviate instance using Docker Compose.
# 1. Create a docker-compose.yml file
cat <<EOF > docker-compose.yml
services:
weaviate:
command:
- --host
- 0.0.0.0
- --port
- '8080'
- --scheme
- http
image: cr.weaviate.io/semitechnologies/weaviate:1.37.9
ports:
- 8080:8080
- 50051:50051
volumes:
- weaviate_data:/var/lib/weaviate
restart: on-failure:0
environment:
AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
CLUSTER_HOSTNAME: 'node1'
volumes:
weaviate_data:
EOF
# 2. Run the container in the background
docker compose up -d
# 3. Verify that it is running (check for a 200 OK response)
curl -i http://localhost:8080/v1/.well-known/ready
4-2. Detailed Installation
This is a detailed process for connecting via the Python client (version 4 or higher) library and interacting with a local Weaviate instance.
# Install the Python client library
pip install weaviate-client
After this, you can establish a database connection and test the status in a Python script as follows:
import weaviate
# Connect securely to the local Weaviate instance (v4 Client connection standard)
client = weaviate.connect_to_local(
host="localhost",
port=8080,
grpc_port=50051
)
try:
# Check the connection status and version
if client.is_ready():
meta = client.get_meta()
print(f"Successfully connected to Weaviate. Version: {meta.get('version')}")
else:
print("The Weaviate instance is not yet ready.")
finally:
client.close()
๐งฌ Bio Use Cases
Protein Structure and Sequence Similarity Semantic Search
Index hundreds of millions of protein sequences in Weaviate by embedding them as high-dimensional vectors using the ESM-2 transformer-based protein language model (pLM). Unlike traditional BLAST string matching, this enables ultra-fast vector comparison to discover proteins with functionally similar 3D structures, even with low primary sequence similarity.
Biomedical Literature and Clinical RAG Pipeline
Store a large corpus of PubMed and PMC biomedical papers and guidelines, and apply a hybrid search index. When querying for tumor suppressor genes and drug resistance mechanisms, use BM25 to accurately retrieve biomarker symbols (TP53, EGFR) and provide recent academic reports as context for the LLM through semantic vector search.
Pathology Multimodal Data (Medical Images + EHR) Integrated Search
Embed cancer tissue H&E pathology images and patient clinical electronic health records (EHR) text into a multimodal model and index them in Weaviate within a single class using multiple vector fields. Query for pathology images and drug response records similar to patients with a specific invasive grade of cancer to identify potential candidates for precision medicine.
FAQ
What is Weaviate?
Weaviate is a high-performance, AI-native, open-source vector database optimized for AI-powered applications and large language model (LLM) workflows. Beyond a simple index for vector math calculations, it stores and manages raw data objects along with their corresponding high-dimensional embedding vectors, functioning as a complete database. This database automatically performs vector transformation (Auto-schema and automatic vectorization) through configured machine learning modules when data is ingested, significantly reducing the complexity of machine learning pipelines. It also fully supports hybrid search, which combines dense vector search with BM25, a traditional keyword search method, to maximize the accuracy of search results. From a biotechnology and biomedical research perspective, Weaviate is a valuable tool. Data in the bio field, such as protein 3D structures, gene expression profiles, biochemical drug formulas, and clinical medical records of numerous patients, is high-dimensional and unstructured. By vector embedding this data using transformer models and storing it in Weaviate, you can explore the similarity of molecular structures or the relevance of clinical contexts at near real-time speeds. In particular, it can be securely deployed and operated on a closed network (On-Premise) without exposing sensitive patient information or proprietary drug intellectual property (IP) to external clouds, making it an ideal alternative for healthcare research labs and biotech companies where data privacy is paramount.
When should I use Weaviate?
AI-native, high-performance, open-source vector database.
What is a biomedical use case for Weaviate?
Protein Structure and Sequence Similarity Semantic Search: Index hundreds of millions of protein sequences in Weaviate by embedding them as high-dimensional vectors using the ESM-2 transformer-based protein language model (pLM). Unlike traditional BLAST string matching, this enables ultra-fast vector comparison to discover proteins with functionally similar 3D structures, even with low primary sequence similarity.
๐ Update Notes
No update notes yet.
๐งช Related Code of Life
No related Code of Life posts yet.