rust-kgdb 0.6.47 → 0.6.49

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 +55 -0
  2. package/README.md +47 -2
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,61 @@
2
2
 
3
3
  All notable changes to the rust-kgdb TypeScript SDK will be documented in this file.
4
4
 
5
+ ## [0.6.49] - 2025-12-17
6
+
7
+ ### Core Concepts Section Added
8
+
9
+ #### New "What We Bring and Why" Section
10
+ Simple Problem → Solution format explaining our 5 core innovations:
11
+
12
+ 1. **Schema-Aware Query Generation**
13
+ - Problem: LLMs hallucinate predicates
14
+ - Solution: Auto-extract schema, inject into prompts
15
+
16
+ 2. **Built-in Database (Not BYODB)**
17
+ - Problem: Other frameworks generate queries but need external DB
18
+ - Solution: rust-kgdb IS the database
19
+
20
+ 3. **Audit Trail (Provenance)**
21
+ - Problem: Where did that answer come from?
22
+ - Solution: Full reasoning trace with every answer
23
+
24
+ 4. **Deterministic Execution**
25
+ - Problem: Same question → different answers
26
+ - Solution: Same hash for same input (compliance-ready)
27
+
28
+ 5. **ARCADE 1-Hop Cache**
29
+ - Problem: Slow embedding neighborhood lookups
30
+ - Solution: Pre-cached 1-hop neighbors for O(1) context
31
+
32
+ ---
33
+
34
+ ## [0.6.48] - 2025-12-17
35
+
36
+ ### Clearer Product Definition
37
+
38
+ #### Added "What Is This?" Section
39
+ New section at the very top of README explaining:
40
+
41
+ 1. **rust-kgdb** = High-Performance RDF Database (Rust core)
42
+ - SPARQL 1.1 query engine (449ns lookups)
43
+ - GraphFrames, Datalog, HNSW embeddings
44
+
45
+ 2. **HyperMind Agent Framework** = AI agent layer (JavaScript)
46
+ - Natural language queries
47
+ - Schema auto-extraction
48
+ - Audit trail
49
+
50
+ **Summary**: "A knowledge graph database with an AI agent layer on top."
51
+
52
+ #### Fixed Misleading +14.3pp Claim
53
+ - **Old (wrong)**: "HyperMind's +14.3pp comes from predicate resolver"
54
+ - **New (correct)**: DSPy gets 14.3% WITHOUT schema due to structured output format
55
+
56
+ **Fact check**: All frameworks achieve identical 71.4% WITH schema.
57
+
58
+ ---
59
+
5
60
  ## [0.6.47] - 2025-12-17
6
61
 
7
62
  ### Memory Retrieval Depth Benchmark Added
package/README.md CHANGED
@@ -4,6 +4,51 @@
4
4
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
5
5
  [![W3C](https://img.shields.io/badge/W3C-SPARQL%201.1%20%7C%20RDF%201.2-blue)](https://www.w3.org/TR/sparql11-query/)
6
6
 
7
+ ## What Is This?
8
+
9
+ **rust-kgdb** is two things in one package:
10
+
11
+ 1. **High-Performance RDF Database** (Rust core)
12
+ - SPARQL 1.1 query engine with 449ns lookup speed
13
+ - GraphFrames analytics (PageRank, connected components, motifs)
14
+ - Datalog reasoning engine
15
+ - HNSW vector embeddings for similarity search
16
+ - 35x faster than RDFox, 25% less memory
17
+
18
+ 2. **HyperMind Agent Framework** (JavaScript layer)
19
+ - AI agents that query the database using natural language
20
+ - Schema auto-extraction from your data
21
+ - Typed tools that prevent hallucination
22
+ - Audit trail for every answer
23
+
24
+ **Think of it as**: A knowledge graph database with an AI agent layer on top. The database provides ground truth. The agent layer makes it accessible via natural language.
25
+
26
+ ---
27
+
28
+ ## Core Concepts: What We Bring and Why
29
+
30
+ ### 1. Schema-Aware Query Generation
31
+ **Problem**: LLMs generate SPARQL with made-up predicates (`?person :fakeProperty ?value`).
32
+ **Solution**: We auto-extract your schema and inject it into prompts. The LLM can ONLY reference predicates that actually exist in your data.
33
+
34
+ ### 2. Built-in Database (Not BYODB)
35
+ **Problem**: LangChain/DSPy generate queries, but you need to find a database to run them.
36
+ **Solution**: rust-kgdb IS the database. Generate query → Execute query → Return results. All in one package.
37
+
38
+ ### 3. Audit Trail (Provenance)
39
+ **Problem**: LLM says "Provider P001 is suspicious" - where did that come from?
40
+ **Solution**: Every answer includes a reasoning trace showing which SPARQL queries ran, which rules matched, and what data was found.
41
+
42
+ ### 4. Deterministic Execution
43
+ **Problem**: Ask the same question twice, get different answers.
44
+ **Solution**: Same input → Same query → Same database → Same result → Same hash. Reproducible for compliance.
45
+
46
+ ### 5. ARCADE 1-Hop Cache
47
+ **Problem**: Embedding lookups are slow when you need neighborhood context.
48
+ **Solution**: Pre-cache 1-hop neighbors. When you find "Provider", instantly know its outgoing predicates (hasRiskScore, hasClaim) without another query.
49
+
50
+ ---
51
+
7
52
  ## AI Answers You Can Trust
8
53
 
9
54
  **The Problem**: LLMs hallucinate. They make up facts, invent data, and confidently state falsehoods. In regulated industries (finance, healthcare, legal), this is not just annoying—it's a liability.
@@ -200,8 +245,8 @@ Based on academic benchmarks: MemQ (arXiv 2503.05193), mKGQAgent (Text2SPARQL 20
200
245
  │ HONEST TRUTH: Schema injection improves ALL frameworks equally. │
201
246
  │ Any framework + schema context achieves ~71% accuracy. │
202
247
  │ │
203
- HyperMind's +14.3pp comes from predicate resolver, but this is
204
- incremental improvement, not a fundamental breakthrough.
248
+ NOTE: DSPy gets 14.3% WITHOUT schema (vs 0% for others) due to
249
+ its structured output format. With schema, all converge to 71.4%.
205
250
  │ │
206
251
  │ OUR REAL VALUE: We include the database. Others don't. │
207
252
  │ - LangChain generates SPARQL → you need to find a database │
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rust-kgdb",
3
- "version": "0.6.47",
3
+ "version": "0.6.49",
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",