Pewarta Proxy

πŸ“‹ Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

βš™οΈ Pengaturan Proxy Target

Skip to content

About

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

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

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

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages