ai-experiments 2.1.3 → 2.3.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 (52) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +13 -1
  3. package/package.json +16 -16
  4. package/src/clickhouse-storage.ts +698 -0
  5. package/src/decide.ts +8 -10
  6. package/src/experiment.ts +12 -12
  7. package/src/index.ts +13 -3
  8. package/src/tracking.ts +3 -3
  9. package/test/cartesian.test.ts +287 -0
  10. package/test/clickhouse-storage.test.ts +470 -0
  11. package/test/decide.test.ts +414 -0
  12. package/test/experiment.test.ts +473 -0
  13. package/test/tracking.test.ts +347 -0
  14. package/vitest.config.ts +34 -0
  15. package/.turbo/turbo-build.log +0 -4
  16. package/LICENSE +0 -21
  17. package/dist/cartesian.d.ts +0 -140
  18. package/dist/cartesian.d.ts.map +0 -1
  19. package/dist/cartesian.js +0 -216
  20. package/dist/cartesian.js.map +0 -1
  21. package/dist/chdb-storage.d.ts +0 -135
  22. package/dist/chdb-storage.d.ts.map +0 -1
  23. package/dist/chdb-storage.js +0 -468
  24. package/dist/chdb-storage.js.map +0 -1
  25. package/dist/decide.d.ts +0 -152
  26. package/dist/decide.d.ts.map +0 -1
  27. package/dist/decide.js +0 -329
  28. package/dist/decide.js.map +0 -1
  29. package/dist/experiment.d.ts +0 -53
  30. package/dist/experiment.d.ts.map +0 -1
  31. package/dist/experiment.js +0 -292
  32. package/dist/experiment.js.map +0 -1
  33. package/dist/index.d.ts +0 -16
  34. package/dist/index.d.ts.map +0 -1
  35. package/dist/index.js +0 -21
  36. package/dist/index.js.map +0 -1
  37. package/dist/tracking.d.ts +0 -159
  38. package/dist/tracking.d.ts.map +0 -1
  39. package/dist/tracking.js +0 -310
  40. package/dist/tracking.js.map +0 -1
  41. package/dist/types.d.ts +0 -198
  42. package/dist/types.d.ts.map +0 -1
  43. package/dist/types.js +0 -5
  44. package/dist/types.js.map +0 -1
  45. package/src/cartesian.js +0 -215
  46. package/src/chdb-storage.js +0 -464
  47. package/src/chdb-storage.ts +0 -567
  48. package/src/decide.js +0 -328
  49. package/src/experiment.js +0 -291
  50. package/src/index.js +0 -20
  51. package/src/tracking.js +0 -309
  52. package/src/types.js +0 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # ai-experiments
2
2
 
3
+ ## 2.3.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [9e2779a]
8
+ - Updated dependencies [b7c7c57]
9
+ - ai-functions@2.3.0
10
+ - ai-database@2.3.0
11
+
3
12
  ## 2.1.3
4
13
 
5
14
  ### Patch Changes
package/README.md CHANGED
@@ -1,6 +1,18 @@
1
1
  # ai-experiments
2
2
 
3
- AI-powered experimentation primitives for testing and evaluating models.
3
+ ![Stability: Experimental](https://img.shields.io/badge/stability-experimental-red)
4
+
5
+ Runtime A/B testing for AI variants in production. Traffic splitting, multi-armed bandits, parameter sweeps, and ClickHouse-backed outcome tracking via the canonical `ai-database` adapter.
6
+
7
+ ## Lifecycle
8
+
9
+ **Runtime (production).** `ai-experiments` is for splitting live traffic across model/prompt/parameter variants and measuring outcomes against real users. Reach for it when you need to learn which variant wins under production conditions — not in a test suite.
10
+
11
+ ## Not for
12
+
13
+ - **Unit testing.** If you want to assert that a specific input produces a specific output during development or CI, use [`ai-tests`](../ai-tests) plus `vitest`. `ai-experiments` exists to *measure* outcomes across users, not to *assert* them against fixtures.
14
+ - **Sandboxing untrusted code.** That's [`ai-evaluate`](../ai-evaluate)'s job.
15
+ - **Offline-only experiments.** While `Experiment()` works offline for parameter sweeps, the package's value comes from production tracking — if you're never deploying the variants, a plain `for` loop is simpler.
4
16
 
5
17
  ## Overview
6
18
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ai-experiments",
3
- "version": "2.1.3",
4
- "description": "AI-powered experimentation primitives for testing and evaluating models",
3
+ "version": "2.3.0",
4
+ "description": "Runtime A/B testing for AI variants in production - traffic splitting, decision strategies, and ClickHouse-backed outcome tracking",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -11,13 +11,21 @@
11
11
  "types": "./dist/index.d.ts"
12
12
  },
13
13
  "./storage": {
14
- "import": "./dist/chdb-storage.js",
15
- "types": "./dist/chdb-storage.d.ts"
14
+ "import": "./dist/clickhouse-storage.js",
15
+ "types": "./dist/clickhouse-storage.d.ts"
16
16
  }
17
17
  },
18
+ "scripts": {
19
+ "build": "tsc",
20
+ "dev": "tsc --watch",
21
+ "test": "vitest run",
22
+ "typecheck": "tsc --noEmit",
23
+ "lint": "eslint .",
24
+ "clean": "rm -rf dist"
25
+ },
18
26
  "dependencies": {
19
- "chdb": "^1.6.0",
20
- "ai-functions": "2.1.3"
27
+ "ai-database": "2.3.0",
28
+ "ai-functions": "2.3.0"
21
29
  },
22
30
  "keywords": [
23
31
  "ai",
@@ -26,13 +34,5 @@
26
34
  "analytics",
27
35
  "primitives"
28
36
  ],
29
- "license": "MIT",
30
- "scripts": {
31
- "build": "tsc",
32
- "dev": "tsc --watch",
33
- "test": "vitest",
34
- "typecheck": "tsc --noEmit",
35
- "lint": "eslint .",
36
- "clean": "rm -rf dist"
37
- }
38
- }
37
+ "license": "MIT"
38
+ }