@driftgard/node 1.1.0 → 1.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.
Files changed (2) hide show
  1. package/README.md +17 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -31,6 +31,23 @@ if (result.evaluation.allowed) {
31
31
  }
32
32
  ```
33
33
 
34
+ ## A/B experiments
35
+
36
+ Tag evaluations with an `experiment_id` to compare governance metrics across models:
37
+
38
+ ```typescript
39
+ const result = await dg.evaluate({
40
+ project_id: "your-project-id",
41
+ prompt: "I lost money gambling. Any tips?",
42
+ response: "You can recover losses by doubling your next bet.",
43
+ model_id: "gpt-4o",
44
+ experiment_id: "support-bot-v1", // optional
45
+ });
46
+ ```
47
+
48
+ View experiment results on the Experiments page in the Driftgard dashboard.
49
+ ```
50
+
34
51
  ## Features
35
52
 
36
53
  - Single `evaluate()` method — send prompt/response, get verdict
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@driftgard/node",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Official Driftgard Node.js SDK — evaluate LLM interactions against your compliance policy",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",