Welcome to Vector AI’s documentation! — vectorai 0.1.0 documentation

# Welcome to Vector AI’s documentation!

Vector AI aims to store vectors alongside documents (text/audio/images/videos). It is designed to be a light-weight library to create/manipulate/search and analyse the underlying vectors to power machine learning applications such as semantic search, recommendations, etc.

- Our REST API documentation can be found here: https://api.vctr.ai/documentation

- Our discord can be found here: https://discord.gg/CbwUxyD

Features:

> - Multimedia Data Vectorisation: Image2Vec, Audio2Vec, etc (Any data can be turned into vectors through machine learning)

> - Vector Similarity Search: Enable searching of vectors and rich multimedia with vector similarity search. The backbone of many popular A.I use cases like reverse image search, recommendations, personalisation, etc.

> - Vector Operations: Flexible search with out of the box operations on vectors. e.g. mean, median, sum, etc.

> - Aggregation: All the traditional aggregation you’d expect. e.g. group by mean, pivot tables, etc

> - Clustering: Interpret your vectors and data by allocating them to buckets and get statistics about these different buckets based on data you provide.

> - Vector Analytics: Get better understanding of your vectors by using out-of-the-box practical vector analytics, giving you better understanding of the quality of your vectors.

## Why Vector AI compared to other Nearest Neighbor implementations?

- Production Ready: Our API is fully managed and can scale to power hundreds of millions of searches a day. Even at millions of searches it is blazing fast through edge caching, gpus and software optisation. So you never have to worry about scaling your infastructure as your use case scales.

- Richer understanding of your vectors and their properties: Our library is designed to allow people to not just designed to obtain nearest neighbors but to actually use in production-ready search systems - allowing users to analyse, iterate, improve and productionise their vectors the moment they are added to the index.

- Simple to use. Quick to get started.: One of our core design principles is that we focus a lot on how people can get started on using Vector AI as quickly as possible, while having a tonne of functionality and customisability options.

- Framework agnostic: We are never going to force a specific framework on Vector AI. If you have a framework of choice, you can use it - as long as your documents are JSON-serializable!

- Store vector data with ease: The document-orientated nature for Vector AI allows users to label, filter search and understand their vectors as much as possible. We think that other libraries that simply provide a nearest-neighbor implementation do not have as rich functionality.

### How to install

To install vectorai, run the following

    pip install vectorai

To install from source, clone the repository and then run

    cd vectorai
    pip install -e .

### Schema

We have a very simple schema to follow to allow you to optimise functionality with vector search:

Schema Rules
Field | Purpose
--- | ---
_id | ID of the document. These need to be unique for the document.
_vector_ | These are required to label the vectors for vector search.

Contents

- Vector AI - Essentials
  - Important Terminologies
  - Documents in Vector AI
  - Models With Vector AI
- QuickStart
  - Build Image Search In 5 Minutes
  - Build Audio Search in 5 Minutes
  - Build Text QA Search in 5 minutes

Guides

- Vector Search / Nearest Neighbors
- Search
  - Hybrid Search
- Collection Metadata
- Advanced Search
  - Using Facets and Filters in search
    - Using facets and filters in vector search
- Advanced Vector Search
  - Multi vector search
    - By Sum
    - Without Sum
    - Multi vector search with different weightings:
- Vector based Recommendations (Search by Id)
  - Single Item Recommendation (One -> Many)
    - Advanced Recommendations With Multiple Vectors
  - Multi Item Recommendations (Many -> Many)
  - Combining Query + Recommendation
- Vector Analytics/Aggregation
  - Traditional aggregation
  - Aggregations can also be published
  - Basic Vector Analytics
  - Clean up
- Clustering
  - Quickstart Clustering
  - Custom clustering of the vectors
- Dimensionality Reduction
  - Quickstart Dimensionality Reduction
  - Custom Dimensionality Reduction
- Visualisations (Advanced)
  - Plotting Dimensionality-Reduced Vectors
  - 1D Cosine Similarity
    - Using With Single Vector
    - Using With Multiple Vectors
  - Plotting Cosine Similarity with 2 Documents
  - Radar Plots
  - Editing Plots
  - Comparing Tables
- Custom Encodings
  - How To Write Custom Encoders
  - Training On Transformers

Case Studies

- Example - Vector Recommendations With NBA Players
  - Visualising NBA players

Frequently Asked Questions

- Frequently Asked Questions
  - I got a JSONDecodeError. How do I resolve this?
  - Does the engine run on a nearest neighbor implementation?
  - When I insert a document with the same ID what happens to the document?
  - How do I add a new field in a collection?
  - How do I get more search results?
  - Are there any limits to the API request calls?
  - Is Vector AI able to store images and videos?

Documentation

- Client
  - Client
- Read
  - Read
- Write
  - Write
- Cluster
  - Cluster
- Array & Dictionary
  - Array & Dictionary
- Dimensionality Reduction
  - Dimensionality Reduction
- Search
  - Search
- Images
  - Images
- Texts
  - Texts
- Audios
  - Audios
- Visualisations
  - Visualisations

# Indices and tables

- Index

- Module Index

- Search Page