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

Quickstart

For quickstart, you can rely on the default embedding option. By default we use "HuggingFaceEmbedding" This eliminates the need to configure embeddings, making the process effortless.

To utilize the vectordb configuration with the default embedding:

=> Vectordb usage with Retriever

from genai_stack.vectordb.chroma import ChromaDB
from genai_stack.retriever.langchain import LangChainRetriever
vectordb =  ChromaDB.from_kwargs(class_name = "genai-stack")
retriever = LangChainRetriever.from_kwargs(vectordb = vectordb)
retriever.retrieve("<My question>")

# Output 
# <Source documents nearest to you question>

=> Vectordb usage with ETL

from genai_stack.vectordb.chroma import ChromaDB
from genai_stack.etl.lang_loader import LangLoaderEtl
from genai_stack.etl.utils import get_config_from_source_kwargs

vectordb =  ChromaDB.from_kwargs(class_name = "genai-stack")
etl = LangLoaderEtl.from_kwargs(vectordb = vectordb, get_config_from_source_kwargs("pdf", "/path/to/pdf"))
etl.run()

Important Note: A vector db is never used alone its used along with either ETL or Retrieval which gives a good usecase to use the vectordb.

PreviousVector DatabaseNextChromadb

Last updated 1 year ago

🔮
🔥