rust-kgdb 0.6.43 → 0.6.44

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +19 -19
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  All notable changes to the rust-kgdb TypeScript SDK will be documented in this file.
4
4
 
5
+ ## [0.6.44] - 2025-12-17
6
+
7
+ ### Honest Documentation (All Numbers Verified)
8
+
9
+ #### Fixed All Misleading Claims
10
+ - **Removed ALL 85.7% claims**: Our verified benchmark shows 71.4% with schema for ALL frameworks
11
+ - **Honest comparison**: Schema injection helps everyone equally (~71%)
12
+ - **Clear positioning**: We beat databases (RDFox), not LLM frameworks (different category)
13
+
14
+ #### Verified Benchmark Results (from `verified_benchmark_results.json`)
15
+ | Framework | No Schema | With Schema |
16
+ |-----------|-----------|-------------|
17
+ | Vanilla OpenAI | 0.0% | 71.4% |
18
+ | LangChain | 0.0% | 71.4% |
19
+ | DSPy | 14.3% | 71.4% |
20
+
21
+ ---
22
+
5
23
  ## [0.6.43] - 2025-12-17
6
24
 
7
25
  ### Clearer Honest Benchmarks
package/README.md CHANGED
@@ -233,9 +233,9 @@ console.log(result.hash);
233
233
  │ │
234
234
  │ TRADITIONAL (Code Gen) OUR APPROACH (Proxy Layer) │
235
235
  │ • 2-5 seconds per query • <100ms per query (20-50x FASTER) │
236
- │ • 20-40% accuracy 85.7% accuracy
236
+ │ • 0-14% accuracy (no schema) 71% accuracy (schema auto-injected)
237
237
  │ • Retry loops on errors • No retries needed │
238
- │ • $0.01-0.05 per query • <$0.001 per query (no LLM)
238
+ │ • $0.01-0.05 per query • <$0.001 per query (cached patterns)
239
239
  │ │
240
240
  ├───────────────────────────────────────────────────────────────────────────┤
241
241
  │ WHY NO CODE GENERATION: │
@@ -286,7 +286,7 @@ OUR APPROACH: User → Proxied Objects → WASM Sandbox → RPC → Real S
286
286
  └── Every answer has derivation chain
287
287
  └── Deterministic hash for reproducibility
288
288
 
289
- (85.7% accuracy, <100ms/query, <$0.001/query)
289
+ (71% accuracy with schema, <100ms/query, <$0.001/query)
290
290
  ```
291
291
 
292
292
  **The Three Pillars** (all as OBJECTS, not strings):
@@ -362,7 +362,7 @@ The following code snippets show EXACTLY how each framework was tested. All test
362
362
 
363
363
  **Reproduce yourself**: `python3 benchmark-frameworks.py` (included in package)
364
364
 
365
- ### Vanilla OpenAI (0% → 85.7% with schema)
365
+ ### Vanilla OpenAI (0% → 71.4% with schema)
366
366
 
367
367
  ```python
368
368
  # WITHOUT SCHEMA: 0% accuracy
@@ -378,7 +378,7 @@ response = client.chat.completions.create(
378
378
  ```
379
379
 
380
380
  ```python
381
- # WITH SCHEMA: 85.7% accuracy (+85.7 pp improvement)
381
+ # WITH SCHEMA: 71.4% accuracy (+71.4 pp improvement)
382
382
  LUBM_SCHEMA = """
383
383
  PREFIX ub: <http://swat.cse.lehigh.edu/onto/univ-bench.owl#>
384
384
  Classes: University, Department, Professor, Student, Course, Publication
@@ -399,7 +399,7 @@ response = client.chat.completions.create(
399
399
  # WORKS: Valid SPARQL using correct ontology terms
400
400
  ```
401
401
 
402
- ### LangChain (0% → 85.7% with schema)
402
+ ### LangChain (0% → 71.4% with schema)
403
403
 
404
404
  ```python
405
405
  # WITHOUT SCHEMA: 0% accuracy
@@ -419,7 +419,7 @@ result = chain.invoke({"question": "Find all teachers"})
419
419
  ```
420
420
 
421
421
  ```python
422
- # WITH SCHEMA: 85.7% accuracy (+85.7 pp improvement)
422
+ # WITH SCHEMA: 71.4% accuracy (+71.4 pp improvement)
423
423
  template = PromptTemplate(
424
424
  input_variables=["question", "schema"],
425
425
  template="""You are a SPARQL query generator.
@@ -434,7 +434,7 @@ result = chain.invoke({"question": "Find all teachers", "schema": LUBM_SCHEMA})
434
434
  # WORKS: Schema injection guides correct predicate selection
435
435
  ```
436
436
 
437
- ### DSPy (14.3% → 85.7% with schema)
437
+ ### DSPy (14.3% → 71.4% with schema)
438
438
 
439
439
  ```python
440
440
  # WITHOUT SCHEMA: 14.3% accuracy (best without schema!)
@@ -456,7 +456,7 @@ result = generator(question="Find all teachers")
456
456
  ```
457
457
 
458
458
  ```python
459
- # WITH SCHEMA: 85.7% accuracy (+71.4 pp improvement)
459
+ # WITH SCHEMA: 71.4% accuracy (+57.1 pp improvement)
460
460
  class SchemaSPARQLGenerator(dspy.Signature):
461
461
  """Generate SPARQL query using the provided schema."""
462
462
  schema = dspy.InputField(desc="Database schema with classes and properties")
@@ -495,7 +495,7 @@ console.log(result.hash);
495
495
  // "sha256:a7b2c3..." - Reproducible answer
496
496
  ```
497
497
 
498
- **Key Insight**: All frameworks achieve the SAME accuracy (85.7%) when given schema. HyperMind's value is that it extracts and injects schema AUTOMATICALLY from your data—no manual prompt engineering required.
498
+ **Key Insight**: All frameworks achieve the SAME accuracy (~71%) when given schema. HyperMind's value is that it extracts and injects schema AUTOMATICALLY from your data—no manual prompt engineering required. Plus it includes the database to actually execute queries.
499
499
 
500
500
  ---
501
501
 
@@ -1072,15 +1072,15 @@ console.log('Supersteps:', result.supersteps) // 5
1072
1072
 
1073
1073
  ### AI Agent Accuracy (Verified December 2025)
1074
1074
 
1075
- | Framework | No Schema | With Schema | With HyperMind |
1076
- |-----------|-----------|-------------|----------------|
1077
- | **Vanilla OpenAI** | 0.0% | 71.4% | 85.7% (+14.3 pp) |
1078
- | **LangChain** | 0.0% | 71.4% | 85.7% (+14.3 pp) |
1079
- | **DSPy** | 14.3% | 71.4% | 85.7% (+14.3 pp) |
1075
+ | Framework | No Schema | With Schema |
1076
+ |-----------|-----------|-------------|
1077
+ | **Vanilla OpenAI** | 0.0% | 71.4% |
1078
+ | **LangChain** | 0.0% | 71.4% |
1079
+ | **DSPy** | 14.3% | 71.4% |
1080
1080
 
1081
- *HyperMind's predicate resolver adds +14.3 pp over schema injection alone.*
1081
+ *Schema injection improves ALL frameworks equally. See `verified_benchmark_results.json` for raw data.*
1082
1082
 
1083
- *Tested: GPT-4o, 7 LUBM queries, real API calls. See `framework_benchmark_*.json` for raw data.*
1083
+ *Tested: GPT-4o, 7 LUBM queries, real API calls.*
1084
1084
 
1085
1085
  ### AI Framework Architectural Comparison
1086
1086
 
@@ -1469,7 +1469,7 @@ Result: ❌ PARSER ERROR - Invalid SPARQL syntax
1469
1469
  3. LLM hallucinates class names → `ub:Faculty` doesn't exist (it's `ub:Professor`)
1470
1470
  4. LLM has no schema awareness → guesses predicates and classes
1471
1471
 
1472
- **HyperMind fixes all of this** with schema injection and typed tools, achieving **85.7% accuracy** vs **0% for vanilla LLMs**.
1472
+ **HyperMind fixes all of this** with schema injection and typed tools, achieving **71% accuracy** vs **0% for vanilla LLMs without schema**.
1473
1473
 
1474
1474
  ### Competitive Landscape
1475
1475
 
@@ -1497,7 +1497,7 @@ Result: ❌ PARSER ERROR - Invalid SPARQL syntax
1497
1497
  | LangChain | ❌ No | ❌ No | ❌ No | ❌ No |
1498
1498
  | DSPy | ⚠️ Partial | ❌ No | ❌ No | ❌ No |
1499
1499
 
1500
- **Note**: This compares architectural features. Benchmark (Dec 2025): Schema injection brings all frameworks to 71.4%. HyperMind's predicate resolver adds +14.3 pp to reach 85.7%.
1500
+ **Note**: This compares architectural features. Benchmark (Dec 2025): Schema injection brings all frameworks to ~71% accuracy equally.
1501
1501
 
1502
1502
  ```
1503
1503
  ┌─────────────────────────────────────────────────────────────────┐
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rust-kgdb",
3
- "version": "0.6.43",
3
+ "version": "0.6.44",
4
4
  "description": "High-performance RDF/SPARQL database with AI agent framework. GraphDB (449ns lookups, 35x faster than RDFox), GraphFrames analytics (PageRank, motifs), Datalog reasoning, HNSW vector embeddings. HyperMindAgent for schema-aware query generation with audit trails. W3C SPARQL 1.1 compliant. Native performance via Rust + NAPI-RS.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",