GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - NeaByteLab/VectorMap-Index: Example implementation of VectorMap-Index for laptop recommendation using KD-Tree + local hash + Ollama embeddings.

BranchesTags
Open more actions menu

Latest commit

 

History

1 Commit
1 Commit

Folders and files

NameName
Last commit message
Last commit date
helpers
helpers
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
data.json
data.json
 
 
generate-product.js
generate-product.js
 
 
index.js
index.js
 
 
package.json
package.json
 
 

Repository files navigation

šŸš€ VectorMap Index

A fast and modular laptop recommendation system using KD-Tree + local hash + Ollama embedding.

āš ļø This is an example implementation of VectorMap-Index. It is provided for educational and demonstration purposes only.

✨ Features

  • 100 laptops with unique, rich descriptions
  • KD-Tree + local hash for ultra-fast nearest neighbor search
  • Embedding powered by local Ollama LLM
  • Clean, modular, and extendable codebase
  • Ready for: top-N search, distance score output, REST API

⚔ Usage

1ļøāƒ£ Generate Laptop Data

Run:

node generate-product.js

āœ… Generates data.json with laptop names, unique descriptions, and embedding vectors.


2ļøāƒ£ Search by Description

Run:

node index.js

āœ… Runs batch search queries and prints matched product names and descriptions.

Example query list inside index.js:

[
  'powerful fast laptop',
  'high resolution laptop',
  'durable grade laptop',
  'long battery laptop',
  'dedicated gpu laptop'
]

3ļøāƒ£ Ollama Requirements

Make sure Ollama is running:

ollama serve

Ensure the embedding model is pulled:

ollama pull nomic-embed-text

āœ… Example Output

Query: powerful fast laptop
Matched: Laptop Model 42 - Laptop Model 42 fast boot time with NVMe SSD
---
Query: high resolution laptop
Matched: Laptop Model 50 - Laptop Model 50 high refresh rate display for gamers
---
Query: durable grade laptop
Matched: Laptop Model 52 - Laptop Model 52 durable keys rated for 20 million presses
---
Query: long battery laptop
Matched: Laptop Model 21 - Laptop Model 21 AI-enhanced battery management system
---
Query: dedicated gpu laptop
Matched: Laptop Model 44 - Laptop Model 44 VR ready specs for immersive gaming
---

šŸ“‚ Project Structure

.
ā”œā”€ā”€ .gitignore                  # Git ignore rules
ā”œā”€ā”€ data.json                   # Generated laptop data with embedding vectors
ā”œā”€ā”€ generate-product.js         # Generates 100 laptops with unique descriptions and vectors
ā”œā”€ā”€ helpers/
│   ā”œā”€ā”€ Ollama.js               # Embedding helper using Ollama
│   └── VectorMap.js            # KD-Tree + local hash VectorMapIndex class
ā”œā”€ā”€ index.js                    # Batch search runner
ā”œā”€ā”€ package.json                # Node.js project config

šŸ“„ License

MIT License Ā© 2025 NeaByteLab

About

Example implementation of VectorMap-Index for laptop recommendation using KD-Tree + local hash + Ollama embeddings.

Topics

kd-treeollama-embeddingsrecommendationvector-search

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Ɨ600. No cookies required.