You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update select-algorithm samples to use local data/ folder
Each sample now expects Hotels_Vector.json in a local data/ folder
instead of referencing the shared ../../data/ path. Added data/README.md
placeholders with copy instructions for each sample.
Path changes:
- TypeScript: data/Hotels_Vector.json (joined with __dirname/..)
- Python: ../data/Hotels_Vector.json (scripts run from src/)
- Go: ./data/Hotels_Vector.json (runs from project root)
- Java: ./data/Hotels_Vector.json (Maven runs from project root)
- .NET: ./data/Hotels_Vector.json (matches appsettings.json)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy `Hotels_Vector.json` from the repository's `ai/data/` folder into this project's `data/` folder:
49
+
50
+
```bash
51
+
cp ../../data/Hotels_Vector.json ./data/
52
+
```
53
+
54
+
4.**Install dependencies**:
47
55
48
56
```bash
49
57
go mod download
50
58
```
51
59
52
-
4.**Sign in to Azure** (for passwordless authentication):
60
+
5.**Sign in to Azure** (for passwordless authentication):
53
61
54
62
```bash
55
63
az login
@@ -62,7 +70,7 @@ This sample demonstrates how to compare different vector search algorithms (IVF,
62
70
Run all 9 combinations (3 algorithms × 3 similarity metrics) in a single execution:
63
71
64
72
```bash
65
-
go run compare_all.go utils.go
73
+
go run ./src/...
66
74
```
67
75
68
76
This creates indexes sequentially (create/search/drop per combo — DocumentDB allows one vector index per kind per field) and prints a comparison table showing scores and top results.
@@ -100,22 +108,22 @@ Test a specific algorithm with cosine similarity:
100
108
101
109
```bash
102
110
# IVF (Inverted File) — clustering-based, works on all tiers
103
-
go run ivf.go utils.go
111
+
go run src/ivf.go src/utils.go
104
112
105
113
# HNSW (Hierarchical Navigable Small World) — graph-based, higher recall
106
-
go run hnsw.go utils.go
114
+
go run src/hnsw.go src/utils.go
107
115
108
116
# DiskANN — disk-optimized, best for large datasets (requires M40+ tier)
0 commit comments