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

Chromadb

Chromadb

This is the default database used when no vectordb is specified . We create a temp directory and persist the embeddings there using the PersistentClient of Chromadb by default.

This is for experimentation purposes when the user wants a quick headstart and wants to experiment with things quickly.

Compulsory arguments:

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

Here are some sample configurations:

=> Chromadb with embedding specification

"vectordb": {
    "name": "chromadb",
    "class_name": "genai_stack",
    "embedding": {
        "name": "HuggingFaceEmbeddings",
        "fields": {
            "model_name": "sentence-transformers/all-mpnet-base-v2",
            "model_kwargs": { "device": "cpu" }
        }
    }
}

==> Chromadb without embedding specification. Without any embedding specification we use the default embedding which is HuggingFaceEmbeddings

"vectordb": {
    "name": "chromadb",
    "class_name": "genai_stack"
}

Python Usage:

from genai_stack.vectordb.chromadb import ChromaDB

config = {"class_name": "MyIndexName"}
vectordb = ChromaDB.from_kwargs(config)
vectordb.search("Your question")

# Output 
# <Documents closest to your question>
PreviousQuickstartNextWeaviate

Last updated 1 year ago

🔮
📦