Running a vector store

Some AI searches over an organisation's documents turn each passage of text into a list of numbers. Those lists are kept in a vector store, and someone has to size it, fill it and keep it correct.

The government's AI Playbook covers the step that makes them. Text is converted into numerical representations, through steps that include vectorisation and embeddings.

How big it gets

The space the vectors take is a multiplication. It is the number of chunks of text, times the numbers in each vector, times the bytes each number uses. A 32-bit number takes 4 bytes.

Here is a worked example with round numbers, as arithmetic only. Take 10,000 documents split into 20 chunks each, which gives 200,000 vectors. At 1,024 numbers per vector and 4 bytes per number, that comes to 200,000 × 1,024 × 4 = 819,200,000 bytes, a little over 0.8 GB.

If your store also keeps the text of each chunk, its labels and a search index, plan for more than the vectors alone. Your own document count, chunk size and model settings give your own total.

Keeping it in step with the documents

Each chunk is a copy of part of a document. When someone edits or withdraws a document, its old chunks and vectors need replacing or removing in the store too.

Where the documents hold personal data, the copies can hold it as well. The Information Commission, which regulates data protection across the UK, covers this in its storage limitation guidance. It asks organisations to review their stored data every so often, and to erase or anonymise what they no longer need. It adds that individuals have a right to erasure if you no longer need the data.

A banner on that page says a review is under way, prompted by Data (Use and Access) Act amendments.

Where it lives

Hosting location is a data protection question too. In the Information Commission's words, "People risk losing the protection of UK data protection law if their personal information is sent (or made accessible) outside the UK."

The guidance calls it a restricted transfer when personal information goes to a separate organisation based abroad. Each one must be covered by one of the transfer mechanisms it lists. Settle where the store runs, and who can reach it from abroad, before it holds real data.

Backups

On backups, Britain's NCSC (the National Cyber Security Centre) gives a popular strategy called the 3-2-1 rule. It means "at least 3 copies, on 2 devices, and 1 offsite backup".

It also asks organisations to back up the configuration data needed to run their systems. And it suggests testing backups regularly, so you know how to restore files before you have to do it for real.

A frame for running it

The NCSC also publishes guidelines on building AI systems securely. They follow a system through four stages, from design and development to deployment and then day-to-day operation and maintenance.

The last stage is the one the store lives in day to day. For that stage, the NCSC points to logging, monitoring, managing updates and sharing information as particularly relevant once a system is live.

Useful links