GenAI Stack (old)
v0.1.0
v0.1.0
  • Getting Started
    • 📚Introduction
    • 🚀Quickstart with colab
    • 📘Default Data Types
    • 🪛Installation
  • Components
    • ✨Introduction
    • 🚜Data Extraction and Loading
      • 🔥Quickstart
      • 📖Advanced Usage
    • 🔮Vector Database
      • 🔥Quickstart
      • 📦Chromadb
      • 📦Weaviate
      • 📖Advanced Usage
    • 📤Retrieval
    • 🦄LLMs
      • OpenAI
      • GPT4All
      • Custom Model
      • 📖Advanced Usage
  • Example Use Cases
    • 💬Chat on PDF
    • âš¡Chat on Webpage
    • 📜Chat on PDF with UI
  • 🧑CONTRIBUTING.md
Powered by GitBook
On this page
  1. Components
  2. Vector Database

Weaviate

PreviousChromadbNextAdvanced Usage

Last updated 1 year ago

Weaviate

In case of weaviate you would have to install weaviate with docker-compose and then use that component in the GenAI Stack.

Compulsory Arguments:

  • class_name => The name of the index under which documents are stored

  • fields:

    • url => Url of the weaviate node

    • text_key => The column against which to do the vector embedding search

    • auth_config: (Optional)

      • api_key => api_key of the weaviate cluster if you are using .

Prerequisites:

Here the docker-compose configurations:

  • This is a sample docker-compose file

version: '3.4'
services:
  weaviate:
    image: semitechnologies/weaviate:1.20.5
    restart: on-failure:0
    ports:
     - "8080:8080"
    environment:
      QUERY_DEFAULTS_LIMIT: 20
      AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED: 'true'
      PERSISTENCE_DATA_PATH: '/var/lib/weaviate'
      DEFAULT_VECTORIZER_MODULE: text2vec-transformers
      ENABLE_MODULES: text2vec-transformers
      TRANSFORMERS_INFERENCE_API: http://t2v-transformers:8080
      CLUSTER_HOSTNAME: 'node1'
    volumes:
      - weaviate_data:/var/lib/weaviate
  t2v-transformers:
    image: semitechnologies/transformers-inference:sentence-transformers-multi-qa-MiniLM-L6-cos-v1
    environment:
      ENABLE_CUDA: 0
volumes:
  weaviate_data:

GenAI Stack Configurations for Weaviate:

=> Sample vectordb configuration for weaviate

"vectordb": {
    "name": "weaviate",
    "class_name": "LegalDocs",
    "fields": {
        "url": "http://localhost:9999/",
        "text_key": "clause_text"
    }
}

Note: Weaviate expects class_name in PascalCase otherwise it might lead to weird index not found errors.

This docker compose file uses sentence transformers for embedding for more embeddings and other options

🔮
📦
weaviate cloud
docker
docker-compose
refer this doc.