Index comparison
Flat, IVF, HNSW and SQ8: recall, time, comparisons, build time and memory.
Eight interactive labs: text chunking, embeddings, semantic search, vector databases, the RAG pipeline, advanced retrieval, chat with your documents and evaluation, plus an assistant builder for your own documents and experiments that run in the browser.
Run real Flat, IVF, HNSW and SQ8 indexes and measure recall, time and memory; see the status of the available vector stores.
Flat, IVF, HNSW and SQ8: recall, time, comparisons, build time and memory.
Recall curve against the number of clusters probed.
Recall curve against ef and the graph structure (layers and edges).
Save about four times the memory and measure the recall lost.
The active store and what is configured on the server, with no claim of any other connection.
Exhaustive comparison (Flat) is exact but slows as data grows. ANN indexes give up some accuracy (recall) in return for more speed and less memory.
Read the lessonHNSW is a multi-layer graph: sparse upper layers for fast jumps and a dense bottom layer for precise search. It starts at the top and descends, following the nearest nodes.
Read the lessonIVF splits vectors into clusters with k-means and searches only the nearest nprobe clusters. Quantisation stores each dimension in 8 bits (or compresses with PQ), saving memory at the cost of a small rounding error.
Read the lesson| Algorithm / concept | Lab | Nature | Complexity | Note |
|---|---|---|---|---|
| Flat index | Vector Databases Lab | Real local execution | O(n·d) | Exhaustive comparison with every vector; always exact. |
| IVF | Vector Databases Lab | Real local execution | O((nlist+n·nprobe/nlist)·d) | k-means clusters; searches the nearest nprobe clusters. |
| HNSW | Vector Databases Lab | Real local execution | ~O(log n) | Multi-layer graph for approximate search; a simplified teaching implementation. |
| Scalar quantisation SQ8 | Vector Databases Lab | Real local execution | O(n·d) | 8 bits per dimension: about four times less memory. |
| Product quantisation (concept) | Vector Databases Lab | Educational simulation | — | Explained conceptually in the lessons; not implemented in the browser. |
| MySQL vector store | Vector Databases Lab | Real local execution | O(n·d) | Stores vectors in site tables and searches by an owner-filtered full scan. |
| Chroma adapter | Vector Databases Lab | External integration | — | Connects to a Chroma server configured by the admin; tested against a real local server. |
| FAISS adapter (separate service) | Vector Databases Lab | External integration | — | Connects to a companion Python service; FAISS does not run inside PHP. |
| Qdrant adapter | Vector Databases Lab | External integration | — | Implemented to the REST protocol; not tested against a real Qdrant server, so test it before relying on it. |
| Milvus and Weaviate (planned) | Vector Databases Lab | Educational simulation | — | Not supported in this version and no connection is claimed. |
Sections
No section has this name. Press “Search” to search all site content.
Favourites
My results & certificates
My academy progressMy quiz resultsKids’ progressAcademy certificatesQuiz certificatesStart any lesson or quiz and it will show up here so you can get back to it quickly.
Settings
I am RAG Mentor. Ask me about chunking, embeddings, vector databases, the RAG pipeline and evaluation, or ask me to explain your experiment results.
Database mode: answers from the lab content on this site's server, with no external service; your conversation is not stored.
The assistant can make mistakes, so check the attached sources.
Welcome! I am Dr. Alaa Taima, and this is my smart assistant on “Deep Learning in Arabic”. Ask it about any term or topic in artificial intelligence, and it will answer from the site's content with links to the sources.
Enter to send · Shift + Enter for a new line · The assistant can make mistakes, so check the sources.