Skip to main content
StarRocks is a High-Performance Analytical Database. StarRocks is a next-gen sub-second MPP database for full analytics scenarios, including multi-dimensional analytics, real-time analytics and ad-hoc query.
Usually StarRocks is categorized into OLAP, and it has showed excellent performance in ClickBench — a Benchmark For Analytical DBMS. Since it has a super-fast vectorized execution engine, it could also be used as a fast vectordb.
Here we’ll show how to use the StarRocks Vector Store.

Setup

Set update_vectordb = False at the beginning. If there is no docs updated, then we don’t need to rebuild the embeddings of docs

Load docs and split them into tokens

Load all markdown files under the docs directory for starrocks documents, you can clone repo from github.com/StarRocks/starrocks, and there is docs directory in it.
Split docs into tokens, and set update_vectordb = True because there are new docs/tokens.

Create vectordb instance

Use StarRocks as vectordb

Convert tokens into embeddings and put them into vectordb

Here we use StarRocks as vectordb, you can configure StarRocks instance via StarRocksSettings. Configuring StarRocks instance is pretty much like configuring mysql instance. You need to specify:
  1. host/port
  2. username(default: ‘root’)
  3. password(default: ”)
  4. database(default: ‘default’)
  5. table(default: ‘langchain’)

Build QA and ask question to it