Glossary

Vector database

A vector database stores embeddings, lists of numbers that represent the meaning of a piece of text, an image or other content, and finds the stored items whose vectors are closest to the vector of a query. It is the search layer behind most retrieval-augmented generation systems, where it finds the passages an AI model should read before it answers.

Book a workflow review

How a search by meaning works

  1. Documents are split into chunks, such as a section of a policy or one product page.
  2. An embedding model turns each chunk into a vector, stored with metadata: source, date, language and who may see it.
  3. A question is turned into a vector by the same model.
  4. The database returns the closest chunks, using an approximate nearest neighbour index such as HNSW so search stays fast as the collection grows.

Vector search alone can miss exact strings such as product codes, invoice numbers and names. Hybrid search, which combines vector similarity with keyword matching, usually handles those better.

A dedicated database or an extension

You may not need a new system. Extensions such as pgvector add vector search to PostgreSQL, which keeps the content, its permissions and its backups in the database you already run. A dedicated vector database earns its place at larger scale or when you need features the extension lacks. Decide with your own data and your own queries, not with a published benchmark.

Arabic content

Choose an embedding model that handles Arabic well, then test it with real questions in Modern Standard Arabic, in dialect and in mixed Arabic and English. For the keyword half of a hybrid search, normalise common spelling variants, such as the forms of alef and a final taa marbuta written as haa, so a search for one spelling also finds the other.

Common mistakes

  • One index for everything, so an assistant retrieves documents the user is not allowed to open. Filter by permissions at query time.
  • Forgetting deletions, so removed or outdated documents keep being found.
  • Mixing vectors from different embedding models, which are not comparable. Changing the model means re-embedding everything.
  • Treating vectors as harmless. They are derived from the text, and parts of it can sometimes be reconstructed, so protect them like the source.

We build retrieval like this for knowledge assistants, including Arabic AI assistants.

A small first step

A 30-minute workflow review

Pick one process that costs your team time. We look at it with you and tell you honestly whether automation or an AI agent pays, what it would take, and what to measure first.

Message us on WhatsApp

Keep exploring

Ready to build something secure?

Tell us about your product. We will reply with a clear plan.

Start a project

We would like to use Microsoft Clarity to see how visitors use the site, so we can improve it. It sets cookies and is off unless you accept. Cookie policy