This repo covers end-to-end examples on the various features and integrations with Weaviate for Javascript Developers!
Setup Instructions 🚀
Clone this repository, and install dependencies
npm install
Head to WCS, where you can easily create a free sandbox cluster.
Take note of your cluster url
and apiKey
Considering you already have docker installed, you can run:
docker compose up -d
IMPORTANT: make sure to define the environment variables before running Docker
cp .env_example .env
If you are using docker, you can keep it like:
WEAVIATE_SCHEME_URL=http
WEAVIATE_URL=localhost:8080
OPENAI_API_KEY=<your openai apikey>
COHERE_API_KEY=<your cohere apikey>
if you are using WCS, you can keep it like:
WEAVIATE_SCHEME_URL=https
WEAVIATE_URL=<yourcluster.weaviate.network>
WEAVIATE_API_KEY=<your_apikey>
OPENAI_API_KEY=<your openai apikey>
COHERE_API_KEY=<your cohere apikey>
HUGGING_FACE_API_KEY=<your huggingface apikey>
PALM_API_KEY=<your palm apikey>
npm run <recipe>
current available recipes:
npm run generative-search/openai
npm run generative-search/cohere
npm run similarity-search/openai
npm run conditional-filters/contains-all-any
npm run multi-tenancy/example
npm run classification/zeroshot
npm run classification/knn
npm run data-with-vectors
- more coming soon!
Here is an outline of the concepts this repository covers:
Similarity Search shows how to run nearText
, nearObject
and nearVector
queries in Weaviate. It is divided by the different providers:
- Cohere -
npm run similarity-search/cohere
- HuggingFace -
npm run similarity-search/hugging-face
- OpenAI -
npm run similarity-search/openai
- PaLM -
npm run similarity-search/palm
- Transformers - coming soon ⏳
Hybrid Search allows you to combine keyword and vector search. The notebook covers how to run a hybrid search query, search on a specific property, add in a where
filter, and how to search with an embedding. It is divided by the different providers:
- Cohere - coming soon ⏳
- Contextionary - coming soon ⏳
- HuggingFace - coming soon ⏳
- OpenAI - coming soon ⏳
- PaLM - coming soon ⏳
- Transformers - coming soon ⏳
Generative Search allows you to improve your search results by piping them through LLM models. It is divided by the different providers:
- Cohere -
npm run generative-search/cohere
- OpenAI -
npm run generative-search/openai
- PaLM -
npm run generative-search/palm
Classification allows you to classify data objects by predicting cross-references based on the semantic meaning of the data objects.
Integrations with Weaviate
-
LlamaIndex
- Episode 1: Data Loaders - coming soon ⏳
- Episode 2: Indexes - coming soon ⏳
- Simple Query Engine - coming soon ⏳
- Sub Question Query Engine - coming soon ⏳
-
Llama 2 Demo
-
GPTCache
- GPTCache notebook - coming soon ⏳
Ranking in Weaviate
- Cohere Rerank - coming soon ⏳
Please note this is an ongoing project, and updates will be made frequently. If you have a feature you would like to see, please drop it in the Weaviate Forum.