Welcome to Verba: The Golden RAGtriever, an open-source application designed to offer an end-to-end, streamlined, and user-friendly interface for Retrieval-Augmented Generation (RAG) out of the box. In just a few easy steps, explore your datasets and extract insights with ease, either locally or through LLM providers such as OpenAI, Cohere, and HuggingFace.
pip install goldenverba
- Verba
- β¨ Getting Started with Verba
- π Installing Python and Setting Up a Virtual Environment
- π¦ Choosing the Right Verba Installation Package
- π Quickstart: Deploy with pip
- π οΈ Quickstart: Build from Source
- π API Keys
- π³ Quickstart: Deploy with Docker
- πΎ Importing Your Data into Verba
- π οΈ Project Architecture
- π Open Source Contribution
Verba is more than just a toolβit's a personal assistant for querying and interacting with your data, either locally or deployed via cloud. Have questions about your documents? Need to cross-reference multiple data points? Want to gain insights from your existing knowledge base? Verba empowers you with the combined capabilities of Weaviate's context-aware database and the analytical power of Large Language Models (LLMs). Interact with your data through an intuitive chat interface that refines search results by using the ongoing conversation context to deliver even more accurate and relevant information.
Verba is engineered with Weaviate's cutting-edge Generative Search technology at its core, extracting relevant context from your pool of documents to resolve queries with precision. By utilizing the power of Large Language Models, Verba doesn't just search for answersβit understands and provides responses that are contextually rich and informed by the content of your documents, all through an intuitive user interface designed for simplicity and efficiency.
Verba offers seamless data import functionality through its frontend, supporting a diverse range of file types including .txt
, .md
, .pdf
and more. Before feeding your data into Weaviate, Verba handles chunking and vectorization to optimize it for search and retrieval. Together with collaborative partners we support popular libraries such as HuggingFace, Haystack, Unstructured and many more!
Experience the hybrid search capabilities of Weaviate within Verba, which merges vector and lexical search methodologies for even greater precision. This dual approach not only navigates through your documents to pinpoint exact matches but also understands the nuance of context, enabling the Large Language Models to craft responses that are both comprehensive and contextually aware. It's an advanced technique that redefines document retrieval, providing you with precisely what you need, when you need it.
Verba enhances search efficiency with Weaviate's Semantic Cache, a sophisticated system that retains the essence of your queries, results, and dialogues. This proactive feature means that Verba anticipates your needs, using cached data to expedite future inquiries. With semantic matching, it quickly determines if your question has been asked before, delivering instant results, and even suggests auto-completions based on historical interactions, streamlining your search experience to be faster and more intuitive.
Starting your Verba journey is super easy, with multiple deployment options tailored to your preferences. Follow these simple steps to get Verba up and running:
- Deploy with pip (Quickstart)
pip install goldenverba
- Build from Source (Quickstart)
git clone https://github.com/weaviate/Verba
pip install -e .
- Use Docker for Deployment (Quickstart)
Prerequisites: If you're not using Docker, ensure that you have Python >=3.9.0
installed on your system.
Before you can use Verba, you'll need to ensure that Python >=3.9.0
is installed on your system and that you can create a virtual environment for a safer and cleaner project setup.
Python is required to run Verba. If you don't have Python installed, follow these steps:
Download the latest Python installer from the official Python website.
Run the installer and make sure to check the box that says Add Python to PATH
during installation.
You can install Python using Homebrew, a package manager for macOS, with the following command in the terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Then install Python:
brew install python
Python usually comes pre-installed on most Linux distributions. If it's not, you can install it using your distribution's package manager. You can read more about it here
It's recommended to use a virtual environment to avoid conflicts with other projects or system-wide Python packages.
First, ensure you have pip installed (it comes with Python if you're using version 3.4 and above). Install virtualenv by running:
pip install virtualenv
Navigate to your project's directory in the terminal. Run the following command to create a virtual environment named venv (you can name it anything you like):
python3 -m virtualenv venv
- On Windows, activate the virtual environment by running:
venv\Scripts\activate.bat
- On macOS and Linux, activate it with:
source venv/bin/activate
Once your virtual environment is activated, you'll see its name in the terminal prompt. Now you're ready to install Verba using the steps provided in the Quickstart sections.
Remember to deactivate the virtual environment when you're done working with Verba by simply running deactivate in the terminal.
We use ruff for automatic code formation and linting. The process is automated with a pre-commit hook. To install the hook, run:
pre-commit install
or for shorthand:
make pre-commit
After that all your commits will be automatically linted and formatted. The linting will happen only on the files you changed.
make pre-commit
formats all files in the repository and install the hooks if needed.
Verba comes in several installation packages, each tailored for specific use cases and environments. Choose the package that aligns with your requirements:
The default package is perfect for getting started quickly and includes support for popular models and services like OpenAI, Cohere, and spaCy. This package is suitable for general use and can be installed easily via pip:
pip install goldenverba
This will set you up with all you need to integrate Verba with these services without additional configuration.
For those looking to leverage models from the HuggingFace ecosystem, including SentenceTransformer
and LLama2
, the HuggingFace version is the ideal choice. This package is optimized for GPU usage to accommodate the high performance demands of these models:
pip install goldenverba[huggingface]
Note: It's recommended to run this version on a system with a GPU to fully utilize the capabilities of the advanced models.
If you're a developer looking to contribute to Verba or need the latest features still in development, the dev version is what you're looking for. This version may be less stable but offers the cutting edge of Verba's capabilities:
pip install goldenverba[dev]
Keep in mind that this version is intended for development purposes and may contain experimental features.
- Initialize a new Python Environment
python3 -m virtualenv venv
- Install Verba
pip install goldenverba
- Launch Verba
verba start
- Access Verba
Visit localhost:8000
- Create .env file and add environment variables
- Clone the Verba repos
git clone https://github.com/weaviate/Verba.git
- Initialize a new Python Environment
python3 -m virtualenv venv
- Install Verba
pip install -e .
- Launch Verba
verba start
- Access Verba
Visit localhost:8000
- Create .env file and add environment variables
Before diving into Verba's capabilities, you'll need to configure access to various components depending on your chosen technologies, such as OpenAI, Cohere, and HuggingFace. Start by obtaining the necessary API keys and setting them up through a .env
file based on our provided example , or by declaring them as environment variables on your system. Below is a comprehensive list of the API keys and variables you may require:
Verba provides flexibility in connecting to Weaviate instances based on your needs. By default, Verba opts for Weaviate Embedded if it doesn't detect the WEAVIATE_URL_VERBA
and WEAVIATE_API_KEY_VERBA
environment variables. This local deployment is the most straightforward way to launch your Weaviate database for prototyping and testing.
However, you have other compelling options to consider:
π©οΈ Weaviate Cloud Service (WCS)
If you prefer a cloud-based solution, Weaviate Cloud Service (WCS) offers a scalable, managed environment. Learn how to set up a cloud cluster and get the API keys by following the Weaviate Cluster Setup Guide.
π³ Docker Deployment Another robust local alternative is deploying Weaviate using Docker. For more details, consult the Weaviate Docker Guide.
WEAVIATE_URL_VERBA=URL-TO-YOUR-WEAVIATE-CLUSTER
WEAVIATE_API_KEY_VERBA=API-KEY-OF-YOUR-WEAVIATE-CLUSTER
Verba supports OpenAI Models such as Ada, GPT3, and GPT4. To use them, you need to specify the OPENAI_API_KEY
environment variable. You can get it from OpenAI
OPENAI_API_KEY=YOUR-OPENAI-KEY
Verba supports Cohere Models, to use them, you need to specify the COHERE_API_KEY
environment variable. You can get it from Cohere
COHERE_API_KEY=YOUR-COHERE-KEY
Verba supports HuggingFace models, such as SentenceTransformers and Llama2. To use them you need the HF_TOKEN
environment variable. You can get it from HuggingFace
HF_TOKEN=YOUR-HUGGINGFACE-TOKEN
To use the Llama2 model from Meta, you first need to request access to it. Read more about accessing the Llama model here. To enable the LLama2 model for Verba use:
LLAMA2-7B-CHAT-HF=True
Verba supports importing documents through Unstructured (e.g .pdf). To use them you need the UNSTRUCTURED_API_KEY
environment variable. You can get it from Unstructured
UNSTRUCTURED_API_KEY=YOUR-UNSTRUCTURED-KEY
UNSTRUCTURED_API_URL=YOUR-SELF-HOSTED-INSTANCE # If you are self hosting, in the form of `http://localhost:8000/general/v0/general`
If you want to use the Github Reader, you need the GITHUB_TOKEN
environment variable. You can get it from GitHub
GITHUB_TOKEN=YOUR-GITHUB-TOKEN
Once configured, you can monitor your Verba installation's health and status via the 'Status Verba' page. This dashboard provides insights into your deployment type, libraries, environment settings, Weaviate schema counts, and more. It's also your go-to for maintenance tasks like resetting Verba, clearing the cache, or managing auto-complete suggestions.
Docker is a set of platform-as-a-service products that use OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries, and configuration files; they can communicate with each other through well-defined channels. All containers are run by a single operating system kernel and are thus more lightweight than virtual machines. Docker provides an additional layer of abstraction and automation of operating-system-level virtualization on Windows and Linux.
Docker's use of containers to package software means that the application and its dependencies, libraries, and other binaries are packaged together and can be moved between environments easily. This makes it incredibly useful for developers looking to create predictable environments that are isolated from other applications.
To get started with deploying Verba using Docker, follow the steps below. If you need more detailed instructions on Docker usage, check out the Docker Curriculum.
If you're unfamiliar with Docker, you can learn more about it here.
- Clone the Verba repos Ensure you have Git installed on your system. Then, open a terminal or command prompt and run the following command to clone the Verba repository:
git clone https://github.com/weaviate/Verba.git
- Deploy using Docker With Docker installed and the Verba repository cloned, navigate to the directory containing the Docker Compose file in your terminal or command prompt. Run the following command to start the Verba application in detached mode, which allows it to run in the background:
docker compose up -d
This command will download the necessary Docker images, create containers, and start Verba. Remember, Docker must be installed on your system to use this method. For installation instructions and more details about Docker, visit the official Docker documentation.
With Verba configured, you're ready to import your data and start exploring. Follow these simple steps to get your data into Verba:
-
Initiate the Import Process
- Click on "Add Documents" to begin.
-
Select Your Data Processing Tools
- At the top, you'll find three tabs labeled
Reader
,Chunker
, andEmbedder
, each offering different options for handling your data.
- At the top, you'll find three tabs labeled
-
Choose a Reader
- The
Reader
is responsible for importing your data. Select from the available options:SimpleReader
: For importing.txt
and.md
files.GitHubReader
: For loading data directly from a GitHub repository by specifying the path (owner/repo/folder_path
).PDFReader
: For importing.pdf
files.
- The
-
Select a Chunker
Chunkers
break down your data into manageable pieces. Choose a suitable chunker:WordChunker
: Chunks the text by words.SentenceChunker
: Chunks the text by sentences.
-
Pick an Embedder
Embedders
are crucial for integrating your data into Weaviate. Select one based on your preference:AdaEmbedder
: Utilizes OpenAI's ADA model for embedding.MiniLMEmbedder
: Employs Sentence Transformers for embedding.CohereEmbedder
: Uses Cohere for embedding.
-
Commence Data Ingestion
- After setting up your preferences, click on "Import" to ingest your data into Verba.
Now your data is ready to be used within Verba, enabling you to leverage its powerful search and retrieval capabilities.
Verba utilizes LLM models through APIs. Be advised that the usage costs for these models will be billed to the API access key you provide. Primarily, costs are incurred during data embedding and answer generation processes.
Your contributions are always welcome! Feel free to contribute ideas, feedback, or create issues and bug reports if you find any! Before contributing, please read the Contribution Guide. Visit our Weaviate Community Forum if you need any help!
You can learn more about Verba's architecture and implementation in its technical documentation and frontend documentation. It's recommended to read them before making any contributions.