Pandey-A/VectorDB---HNSW-RAG — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a small educational vector database demo in C++ with a simple browser UI.

I want it to show how semantic search works under the hood. Include three search options, HNSW, KD Tree, and brute force, so I can run the same query and compare their speed. Also let me switch between cosine, Euclidean, and Manhattan distance. Start with some built in demo vectors for categories like computer science, math, food, and sports, and show them on a 2D scatter plot so the clusters are easy to understand.

Add a document mode where I can paste text, give it a title, and store it as embeddings using Ollama locally. Then add an Ask AI tab where I can ask questions about the documents I inserted, retrieve the most relevant chunks with HNSW, and answer using a local Ollama model.

Please make it run locally on Windows, serve the UI at localhost, and include clear setup and run instructions. Look up current Ollama docs if needed.

Want more depth? Deep Reverse