retriv 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -244,18 +244,18 @@ interface SearchResult {
244
244
 
245
245
  ## Benchmarks
246
246
 
247
- Retrieval accuracy on Nuxt documentation (639 docs):
247
+ Retrieval accuracy on Nuxt documentation (2,817 chunks):
248
248
 
249
249
  | Test Type | FTS | Vector | Hybrid |
250
250
  |-----------|-----|--------|--------|
251
- | Exact terminology (ports, config names) | 3/3 | 2/3 | 3/3 |
252
- | Doc retrieval (keyword overlap) | 3/3 | 2/3 | 3/3 |
253
- | Semantic queries (synonyms, no overlap) | 0/3 | 3/3 | 3/3 |
254
- | **Total** | **6/9 (67%)** | **7/9 (78%)** | **9/9 (100%)** |
251
+ | Exact terminology (ports, config names) | 7/7 | 5/7 | 7/7 |
252
+ | Doc retrieval (keyword overlap) | 0/7 | 5/7 | 5/7 |
253
+ | Semantic queries (synonyms, no overlap) | 1/6 | 5/6 | 5/6 |
254
+ | **Total** | **8/20 (40%)** | **15/20 (75%)** | **17/20 (85%)** |
255
255
 
256
256
  - **FTS** excels at exact terms but fails semantic queries ("reuse logic" → composables)
257
- - **Vector** understands meaning but misses precise terminology ("port 3000")
258
- - **Hybrid** combines both - never worse than either method alone
257
+ - **Vector** understands meaning but misses precise terminology (".global" suffix)
258
+ - **Hybrid** combines both - best overall recall across query types
259
259
 
260
260
  Run locally: `pnpm test:eval`
261
261
 
@@ -20,8 +20,8 @@ const DEFAULT_MODELS = {
20
20
  dimensions: 768
21
21
  },
22
22
  "transformers.js": {
23
- model: "Xenova/bge-base-en-v1.5",
24
- dimensions: 768
23
+ model: "Xenova/bge-small-en-v1.5",
24
+ dimensions: 384
25
25
  }
26
26
  };
27
27
  const MODEL_DIMENSIONS = {
@@ -11,7 +11,7 @@ async function clearCorruptedCache(error, model) {
11
11
  return true;
12
12
  }
13
13
  function transformersJs(options = {}) {
14
- const model = resolveModelForPreset(options.model ?? "bge-base-en-v1.5", "transformers.js");
14
+ const model = resolveModelForPreset(options.model ?? "bge-small-en-v1.5", "transformers.js");
15
15
  let cached = null;
16
16
  return { async resolve() {
17
17
  if (cached) return cached;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "retriv",
3
3
  "type": "module",
4
- "version": "0.1.0",
4
+ "version": "0.2.0",
5
5
  "description": "Unified document retrieval for search - semantic, full-text, and fuzzy.",
6
6
  "author": {
7
7
  "name": "Harlan Wilton",
@@ -139,17 +139,18 @@
139
139
  "@huggingface/transformers": "^3.8.1",
140
140
  "@libsql/client": "^0.17.0",
141
141
  "@types/node": "^25.2.0",
142
- "@types/pg": "^8.11.0",
143
- "@upstash/vector": "^1.1.0",
142
+ "@types/pg": "^8.16.0",
143
+ "@upstash/vector": "^1.2.2",
144
144
  "@vitest/coverage-v8": "^4.0.18",
145
145
  "ai": "^6.0.67",
146
- "bumpp": "^10.3.2",
146
+ "ai-sdk-provider-gemini-cli": "^2.0.1",
147
+ "bumpp": "^10.4.0",
147
148
  "eslint": "^9.39.2",
148
- "obuild": "^0.4.14",
149
+ "obuild": "^0.4.22",
149
150
  "pg": "^8.18.0",
150
151
  "sqlite-vec": "^0.1.7-alpha.2",
151
152
  "typescript": "^5.9.3",
152
- "vitest": "^4.0.16",
153
+ "vitest": "^4.0.18",
153
154
  "zod": "^4.3.6"
154
155
  },
155
156
  "scripts": {