evaliphy 1.0.1-beta.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/LICENSE +21 -0
- package/README.md +69 -0
- package/dist/bin.mjs +32154 -0
- package/dist/index.cjs +23619 -0
- package/dist/index.d.cts +474 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +475 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +23616 -0
- package/dist/index.mjs.map +1 -0
- package/dist/token-BO1lsZ-5.cjs +50 -0
- package/dist/token-DCOmhj5H.mjs +48 -0
- package/dist/token-DCOmhj5H.mjs.map +1 -0
- package/dist/token-DLF_w5dW.mjs +47 -0
- package/dist/token-error-C8wr5ChX.cjs +79 -0
- package/dist/token-error-TubvLIoa.mjs +66 -0
- package/dist/token-error-TubvLIoa.mjs.map +1 -0
- package/dist/token-util-BkG6B60o.mjs +352 -0
- package/dist/token-util-Dq_zJSbD.mjs +353 -0
- package/dist/token-util-Dq_zJSbD.mjs.map +1 -0
- package/dist/token-util-lhnRiXba.cjs +355 -0
- package/package.json +66 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Evaliphy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Evaliphy (Beta)
|
|
2
|
+
|
|
3
|
+
> **RAG Evaluation, Without the ML Jargon.**
|
|
4
|
+
|
|
5
|
+
The first QA-centric SDK for testing Retrieval-Augmented Generation. Write end-to-end evaluations for your AI pipelines using the exact same workflow you use for Playwright. No prompt engineering required.
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/evaliphy)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install evaliphy@beta
|
|
14
|
+
npx evaliphy init
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## If you can write a test, you can evaluate AI.
|
|
18
|
+
|
|
19
|
+
Stop fighting with Python notebooks, complex ML metrics, and brittle API calls. Evaliphy gives you a fluent, type-safe API to test RAG pipelines as black boxes.
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import { evaluate, expect } from 'evaliphy';
|
|
23
|
+
|
|
24
|
+
const sample = {
|
|
25
|
+
query: "What is the return policy?",
|
|
26
|
+
expectedContext: "Items can be returned within 30 days."
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
evaluate("Return Policy Chat", async ({ httpClient }) => {
|
|
30
|
+
// 1. Hit your RAG endpoint (streaming supported natively)
|
|
31
|
+
const res = await httpClient.post('/api/chat', { message: sample.query });
|
|
32
|
+
const data = await res.json();
|
|
33
|
+
|
|
34
|
+
// 2. Assert against the LLM's behavior in plain English
|
|
35
|
+
await expect(data.answer).toBeFaithful({threshold:0.8});
|
|
36
|
+
await expect(data.answer).toBeRelevant();
|
|
37
|
+
});
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Built for Quality Engineers, not Data Scientists.
|
|
41
|
+
|
|
42
|
+
### 📥 Bring Your Own Data
|
|
43
|
+
No magic background context. Pass your golden data, CSV rows, or database records directly into the assertions so you always know exactly what is being tested.
|
|
44
|
+
|
|
45
|
+
### 🤖 Zero-Config LLM Judge
|
|
46
|
+
We spent hundreds of hours benchmarking LLM-as-a-judge prompts so you don't have to. Just provide your OpenAI or Anthropic API key, and Evaliphy handles the prompting, parsing, and retry logic.
|
|
47
|
+
|
|
48
|
+
### 🚀 Seamless CI/CD
|
|
49
|
+
It’s just Node.js. Run your RAG evaluations in GitHub Actions, GitLab CI, or Jenkins using the standard `npx evaliphy run` command. Get clear, console-native pass/fail reports.
|
|
50
|
+
|
|
51
|
+
## How it Works
|
|
52
|
+
|
|
53
|
+
1. **Configure Once:** Set your LLM judge models (e.g., `gpt-4o-mini`) and confidence thresholds globally in `evaliphy.config.ts`.
|
|
54
|
+
2. **Collect & Execute:** Evaliphy builds a deterministic test tree, then executes your HTTP calls and RAG pipelines in parallel.
|
|
55
|
+
3. **Evaluate & Report:** The built-in LLM judge evaluates the responses against your assertions and returns human-readable failure reasons—not just a `false` boolean.
|
|
56
|
+
|
|
57
|
+
## Join the Beta Program
|
|
58
|
+
|
|
59
|
+
We are currently in open beta. We’re looking for QA teams and software engineers building RAG applications to help us refine the API and expand our matcher library.
|
|
60
|
+
|
|
61
|
+
- ✅ Free for commercial use during Beta
|
|
62
|
+
- ✅ Direct access to the core engineering team
|
|
63
|
+
- ✅ Influence the v1.0 roadmap
|
|
64
|
+
|
|
65
|
+
[Star on GitHub](https://github.com/priyanshus/evaliphy) | [Join the Discord](https://discord.gg/evaliphy)
|
|
66
|
+
|
|
67
|
+
## License
|
|
68
|
+
|
|
69
|
+
MIT © [Evaliphy](https://github.com/priyanshus/evaliphy)
|