@devilsdev/rag-pipeline-utils 2.1.5 → 2.1.8
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 +674 -674
- package/README.md +395 -179
- package/bin/cli.js +14 -62
- package/contracts/embedder-contract.json +52 -0
- package/contracts/llm-contract.json +36 -0
- package/contracts/loader-contract.json +43 -0
- package/contracts/retriever-contract.json +68 -0
- package/dist/index.cjs +67 -0
- package/dist/index.mjs +51 -0
- package/package.json +108 -22
- package/.codecov.yml +0 -21
- package/.dockerignore +0 -14
- package/.eslintignore +0 -5
- package/.eslintrc.json +0 -28
- package/.github/PROJECT_ROADMAP.md +0 -102
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
- package/.github/release-template.md +0 -20
- package/.github/workflows/changelog-auto-commit.yml +0 -37
- package/.github/workflows/ci.yml +0 -53
- package/.github/workflows/docs-ci.yml +0 -46
- package/.github/workflows/docs-deploy.yml +0 -55
- package/.github/workflows/enforce-release-review.yml +0 -47
- package/.github/workflows/publish-release-blog.yml +0 -47
- package/.github/workflows/release-sync.yml +0 -50
- package/.github/workflows/roadmap-label-sync.yml +0 -35
- package/.github/workflows/roadmap-labels.yml +0 -67
- package/.github/workflows/roadmap-sync.yml +0 -44
- package/.github/workflows/sync-roadmap.yml +0 -62
- package/.husky/pre-commit +0 -6
- package/CHANGELOG.md +0 -97
- package/Dockerfile +0 -22
- package/Use-Cases.md +0 -134
- package/__tests__/fixtures/.ragrc.json +0 -8
- package/__tests__/fixtures/invalid-ragrc.json +0 -4
- package/__tests__/fixtures/sample-eval-dataset.json +0 -15
- package/__tests__/fixtures/sample.pdf +0 -1
- package/__tests__/fixtures/src/mocks/openai-embedder.js +0 -16
- package/__tests__/fixtures/src/mocks/openai-llm.js +0 -9
- package/__tests__/fixtures/src/mocks/pdf-loader.js +0 -17
- package/__tests__/fixtures/src/mocks/pinecone-retriever.js +0 -26
- package/__tests__/fixtures/valid-ragrc.json +0 -16
- package/__tests__/integration/cli/config-flow.test.js +0 -98
- package/__tests__/integration/config/load-config.test.js +0 -67
- package/__tests__/scripts/ensure-roadmap-labels.test.js +0 -64
- package/__tests__/unit/config/validate-schema.test.js +0 -121
- package/__tests__/unit/core/plugin-registry.test.js +0 -55
- package/__tests__/unit/reranker/__snapshots__/reranker.snapshot.test.js.snap +0 -15
- package/__tests__/unit/reranker/llm-reranker.test.js +0 -18
- package/__tests__/unit/reranker/reranker.enriched.test.js +0 -19
- package/__tests__/unit/reranker/reranker.fallback.test.js +0 -15
- package/__tests__/unit/reranker/reranker.snapshot.test.js +0 -15
- package/__tests__/unit/reranker/reranker.structured-output.test.js +0 -17
- package/codecov +0 -0
- package/codecov.SHA256SUM +0 -1
- package/codecov.SHA256SUM.sig +0 -16
- package/docs-site/README.md +0 -41
- package/docs-site/blog/2025-04-18-architecture-overview.md +0 -16
- package/docs-site/blog/2025-04-18-release-v2.1.1.md +0 -13
- package/docs-site/blog/2025-04-19-prompt-engineering-best-practices.md +0 -16
- package/docs-site/blog/2025-04-20-image-showcase.md +0 -14
- package/docs-site/blog/2025-04-20-release-2.1.1.md +0 -21
- package/docs-site/blog/2025-04-21-release-v2.1.3.md +0 -13
- package/docs-site/blog/2025-04-21-release-v2.1.4.md +0 -13
- package/docs-site/blog/authors.yml +0 -5
- package/docs-site/blog/tags.yml +0 -60
- package/docs-site/docs/Architecture.md +0 -76
- package/docs-site/docs/CLI.md +0 -69
- package/docs-site/docs/Evaluation.md +0 -61
- package/docs-site/docs/FAQ.md +0 -50
- package/docs-site/docs/Introduction.md +0 -58
- package/docs-site/docs/Plugins.md +0 -61
- package/docs-site/docs/Tutorials.md +0 -106
- package/docs-site/docs/Usage.md +0 -72
- package/docs-site/docs/Use-Cases.md +0 -77
- package/docs-site/docs/intro.mdx +0 -6
- package/docs-site/docusaurus.config.js +0 -88
- package/docs-site/package-lock.json +0 -17914
- package/docs-site/package.json +0 -47
- package/docs-site/sidebars.js +0 -39
- package/docs-site/src/components/HomepageFeatures/index.js +0 -56
- package/docs-site/src/components/HomepageFeatures/index.module.css +0 -57
- package/docs-site/src/components/HomepageHeader/index.js +0 -46
- package/docs-site/src/components/HomepageHeader/index.module.css +0 -77
- package/docs-site/src/css/custom.css +0 -104
- package/docs-site/src/pages/index.js +0 -20
- package/docs-site/src/pages/index.module.css +0 -23
- package/docs-site/src/pages/markdown-page.md +0 -7
- package/docs-site/static/.nojekyll +0 -0
- package/docs-site/static/img/authors/ali.jpg +0 -0
- package/docs-site/static/img/hero.jpg +0 -0
- package/docs-site/static/img/logo.png +0 -0
- package/docs-site/static/img/logo.svg +0 -6
- package/docs-site/static/img/social-card.jpg +0 -0
- package/jest.config.js +0 -24
- package/plugin.config.json +0 -14
- package/public/index.html +0 -0
- package/public/results/sample-eval.json +0 -0
- package/public/src/App.jsx +0 -57
- package/release.config.js +0 -36
- package/scripts/banner-injector.js +0 -102
- package/scripts/ci-runner.js +0 -51
- package/scripts/close-done-roadmap-issues.js +0 -65
- package/scripts/create-roadmap-issues.js +0 -47
- package/scripts/ensure-roadmap-labels.js +0 -73
- package/scripts/fix-mdx-blog-imports.js +0 -50
- package/scripts/fix-mdx-image-imports.js +0 -27
- package/scripts/generate-release-note.js +0 -40
- package/scripts/label-roadmap-issues.js +0 -125
- package/scripts/manual-test-checklist.md +0 -90
- package/scripts/repair-fixtures.js +0 -30
- package/scripts/setup.js +0 -31
- package/scripts/sync-labels.js +0 -71
- package/scripts/sync-roadmap-labels.js +0 -21
- package/scripts/tag-release.js +0 -64
- package/scripts/test-global-setup.js +0 -18
- package/scripts/validate-changelog-version.js +0 -48
- package/scripts/verify-fixture-mocks.js +0 -45
- package/scripts/verify-fixtures.js +0 -36
- package/server.js +0 -31
- package/src/config/load-config.js +0 -33
- package/src/config/load-plugin-config.js +0 -56
- package/src/config/validate-plugin-schema.js +0 -28
- package/src/config/validate-schema.js +0 -107
- package/src/core/create-pipeline.js +0 -96
- package/src/core/plugin-contracts.js +0 -21
- package/src/core/plugin-registry.js +0 -48
- package/src/dag/dag-engine.js +0 -70
- package/src/evaluate/evaluator.js +0 -44
- package/src/evaluate/scoring.js +0 -74
- package/src/loader/csv-loader.js +0 -30
- package/src/loader/directory-loader.js +0 -38
- package/src/loader/html-loader.js +0 -57
- package/src/loader/markdown-loader.js +0 -58
- package/src/mocks/openai-embedder.js +0 -30
- package/src/mocks/openai-llm.js +0 -18
- package/src/mocks/pdf-loader.js +0 -17
- package/src/mocks/pinecone-retriever.js +0 -25
- package/src/reranker/llm-reranker.js +0 -34
- package/src/utils/ci/diagnostic-reporter.js +0 -36
- package/src/utils/logger.js +0 -29
- package/src/utils/retry.js +0 -42
- package/src/utils/validate-plugin-contract.js +0 -36
package/docs-site/package.json
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "rag-docs-test",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"scripts": {
|
|
6
|
-
"docusaurus": "docusaurus",
|
|
7
|
-
"start": "docusaurus start",
|
|
8
|
-
"build": "docusaurus build",
|
|
9
|
-
"swizzle": "docusaurus swizzle",
|
|
10
|
-
"deploy": "docusaurus deploy",
|
|
11
|
-
"clear": "docusaurus clear",
|
|
12
|
-
"serve": "docusaurus serve",
|
|
13
|
-
"write-translations": "docusaurus write-translations",
|
|
14
|
-
"write-heading-ids": "docusaurus write-heading-ids",
|
|
15
|
-
"lint": "echo 'Lint skipped for docs-site'",
|
|
16
|
-
"test": "echo 'No tests in docs-site. Run from root.'",
|
|
17
|
-
"docs:build": "npm run --workspace ../ docs:build"
|
|
18
|
-
},
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"@docusaurus/core": "3.7.0",
|
|
21
|
-
"@docusaurus/preset-classic": "3.7.0",
|
|
22
|
-
"@mdx-js/react": "^3.0.0",
|
|
23
|
-
"clsx": "^2.0.0",
|
|
24
|
-
"prism-react-renderer": "^2.3.0",
|
|
25
|
-
"react": "^19.0.0",
|
|
26
|
-
"react-dom": "^19.0.0"
|
|
27
|
-
},
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
"@docusaurus/module-type-aliases": "3.7.0",
|
|
30
|
-
"@docusaurus/types": "3.7.0"
|
|
31
|
-
},
|
|
32
|
-
"browserslist": {
|
|
33
|
-
"production": [
|
|
34
|
-
">0.5%",
|
|
35
|
-
"not dead",
|
|
36
|
-
"not op_mini all"
|
|
37
|
-
],
|
|
38
|
-
"development": [
|
|
39
|
-
"last 3 chrome version",
|
|
40
|
-
"last 3 firefox version",
|
|
41
|
-
"last 5 safari version"
|
|
42
|
-
]
|
|
43
|
-
},
|
|
44
|
-
"engines": {
|
|
45
|
-
"node": ">=18.0"
|
|
46
|
-
}
|
|
47
|
-
}
|
package/docs-site/sidebars.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Sidebar configuration for RAG Pipeline Utils documentation site
|
|
5
|
-
* Version: 2.0.0
|
|
6
|
-
* Author: Ali Kahwaji
|
|
7
|
-
* Updated: Structured for modular clarity and DX
|
|
8
|
-
* @type {import('@docusaurus/plugin-content-docs').SidebarsConfig}
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
const sidebars = {
|
|
12
|
-
tutorialSidebar: [
|
|
13
|
-
{
|
|
14
|
-
type: 'category',
|
|
15
|
-
label: 'Overview',
|
|
16
|
-
collapsed: false,
|
|
17
|
-
items: ['Introduction', 'Architecture', 'Tutorials', 'Use-Cases'],
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
type: 'category',
|
|
21
|
-
label: 'Developer Guide',
|
|
22
|
-
collapsed: false,
|
|
23
|
-
items: ['Usage', 'CLI', 'Plugins'],
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
type: 'category',
|
|
27
|
-
label: 'Advanced',
|
|
28
|
-
collapsed: true,
|
|
29
|
-
items: ['Evaluation', 'FAQ'],
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
type: 'link',
|
|
33
|
-
label: '📰 Blog',
|
|
34
|
-
href: '/blog',
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export default sidebars;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Version: 1.4.1
|
|
3
|
-
* Description: Feature grid with Framer Motion and deduplicated layout
|
|
4
|
-
* Author: Ali Kahwaji
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import clsx from 'clsx';
|
|
9
|
-
import { motion } from 'framer-motion';
|
|
10
|
-
import styles from './index.module.css';
|
|
11
|
-
|
|
12
|
-
import FeatureImage from '@site/static/img/logo.svg';
|
|
13
|
-
|
|
14
|
-
const features = [
|
|
15
|
-
{
|
|
16
|
-
title: 'Composable Pipelines',
|
|
17
|
-
description: 'Build flexible RAG workflows with interchangeable loaders, embedders, retrievers, and LLM runners using a clean plugin-based design.',
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
title: 'Evaluation & Dashboard',
|
|
21
|
-
description: 'Use built-in CLI tooling and React dashboards to assess LLM accuracy, BLEU/ROUGE scores, and prompt results at scale.',
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
title: 'Fully Extendable',
|
|
25
|
-
description: 'Register custom components with the PluginRegistry and extend the system without modifying the core logic.',
|
|
26
|
-
},
|
|
27
|
-
];
|
|
28
|
-
|
|
29
|
-
export default function HomepageFeatures() {
|
|
30
|
-
return (
|
|
31
|
-
<section className={styles.features}>
|
|
32
|
-
<div className="container">
|
|
33
|
-
<div className="row">
|
|
34
|
-
{features.map((feature, idx) => (
|
|
35
|
-
<motion.div
|
|
36
|
-
key={idx}
|
|
37
|
-
className={clsx('col col--4', styles.feature)}
|
|
38
|
-
initial={{ opacity: 0, y: 30 }}
|
|
39
|
-
whileInView={{ opacity: 1, y: 0 }}
|
|
40
|
-
viewport={{ once: true, amount: 0.3 }}
|
|
41
|
-
transition={{ duration: 0.6, delay: idx * 0.2 }}
|
|
42
|
-
>
|
|
43
|
-
<div className="text--center">
|
|
44
|
-
<FeatureImage className={styles.featureSvg} role="img" alt={feature.title} />
|
|
45
|
-
</div>
|
|
46
|
-
<div className="text--center padding-horiz--md">
|
|
47
|
-
<h3 className={styles.featureTitle}>{feature.title}</h3>
|
|
48
|
-
<p className={styles.featureText}>{feature.description}</p>
|
|
49
|
-
</div>
|
|
50
|
-
</motion.div>
|
|
51
|
-
))}
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
</section>
|
|
55
|
-
);
|
|
56
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Version: 1.4.1
|
|
3
|
-
* Description: HomepageFeatures styles with consistent spacing, mint theming, and animation polish
|
|
4
|
-
* Author: Ali Kahwaji
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
.features {
|
|
8
|
-
padding: 4rem 0;
|
|
9
|
-
background-color: var(--ifm-background-color);
|
|
10
|
-
transition: background-color 0.3s ease;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.feature {
|
|
14
|
-
text-align: center;
|
|
15
|
-
padding: 2rem 1rem;
|
|
16
|
-
transition: transform 0.3s ease;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.feature:hover {
|
|
20
|
-
transform: translateY(-4px);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.featureSvg {
|
|
24
|
-
height: 100px;
|
|
25
|
-
width: auto;
|
|
26
|
-
margin-bottom: 1rem;
|
|
27
|
-
fill: var(--ifm-color-primary);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.featureTitle {
|
|
31
|
-
font-size: 1.25rem;
|
|
32
|
-
font-weight: 600;
|
|
33
|
-
color: var(--ifm-heading-color);
|
|
34
|
-
margin-bottom: 0.5rem;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.featureText {
|
|
38
|
-
font-size: 0.95rem;
|
|
39
|
-
line-height: 1.6;
|
|
40
|
-
color: var(--ifm-font-color-base);
|
|
41
|
-
max-width: 280px;
|
|
42
|
-
margin: 0 auto;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
@media (max-width: 768px) {
|
|
46
|
-
.features {
|
|
47
|
-
padding: 2rem 0;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.feature {
|
|
51
|
-
padding: 1.5rem 0.5rem;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.featureSvg {
|
|
55
|
-
height: 80px;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Version: 2.4.2
|
|
3
|
-
* Description: Crash-proof homepage header with full fallback safety
|
|
4
|
-
* Author: Ali Kahwaji
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import React from 'react';
|
|
8
|
-
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
|
|
9
|
-
import Link from '@docusaurus/Link';
|
|
10
|
-
import clsx from 'clsx';
|
|
11
|
-
import styles from './index.module.css';
|
|
12
|
-
import Logo from '@site/static/img/logo.svg';
|
|
13
|
-
|
|
14
|
-
export default function HomepageHeader() {
|
|
15
|
-
let siteConfig = { title: 'RAG Pipeline Utils', tagline: 'Composable pipelines for LLMs' };
|
|
16
|
-
|
|
17
|
-
try {
|
|
18
|
-
const context = useDocusaurusContext();
|
|
19
|
-
if (context && context.siteConfig) {
|
|
20
|
-
siteConfig = {
|
|
21
|
-
title: context.siteConfig.title || siteConfig.title,
|
|
22
|
-
tagline: context.siteConfig.tagline || siteConfig.tagline,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
} catch (e) {
|
|
26
|
-
console.warn('useDocusaurusContext failed:', e);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return (
|
|
30
|
-
<header className={clsx('hero', styles.heroBanner)}>
|
|
31
|
-
<div className="container text--center">
|
|
32
|
-
<Logo className={styles.logo} role="img" alt="RAG Utils Logo" />
|
|
33
|
-
<h1 className="hero__title">{siteConfig.title}</h1>
|
|
34
|
-
<p className="hero__subtitle">{siteConfig.tagline}</p>
|
|
35
|
-
<div className={styles.buttons}>
|
|
36
|
-
<Link className="button button--primary button--lg" to="/docs/Introduction">
|
|
37
|
-
Get Started
|
|
38
|
-
</Link>
|
|
39
|
-
<Link className="button button--outline button--lg" to="/blog">
|
|
40
|
-
Visit Blog
|
|
41
|
-
</Link>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
</header>
|
|
45
|
-
);
|
|
46
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Version: 1.4.0
|
|
3
|
-
* Path: docs-site/src/components/HomepageHeader/index.module.css
|
|
4
|
-
* Description: Styles for responsive hero banner with mint green CTA
|
|
5
|
-
* Author: Ali Kahwaji
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
:root {
|
|
9
|
-
--hero-accent: #3EF4B6;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.heroBanner {
|
|
13
|
-
padding: 5rem 2rem;
|
|
14
|
-
background: var(--ifm-background-color);
|
|
15
|
-
text-align: center;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.heroTitle {
|
|
19
|
-
font-size: 3rem;
|
|
20
|
-
font-weight: 700;
|
|
21
|
-
color: var(--ifm-heading-color);
|
|
22
|
-
margin-bottom: 1rem;
|
|
23
|
-
line-height: 1.2;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.heroSubtitle {
|
|
27
|
-
font-size: 1.2rem;
|
|
28
|
-
color: var(--ifm-font-color-base);
|
|
29
|
-
max-width: 720px;
|
|
30
|
-
margin: 0 auto 2rem auto;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.buttons {
|
|
34
|
-
display: flex;
|
|
35
|
-
flex-wrap: wrap;
|
|
36
|
-
gap: 1rem;
|
|
37
|
-
justify-content: center;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.ctaButton {
|
|
41
|
-
border-radius: 8px;
|
|
42
|
-
font-weight: 600;
|
|
43
|
-
padding: 0.75rem 2rem;
|
|
44
|
-
transition: all 0.25s ease-in-out;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.ctaButton.button--primary {
|
|
48
|
-
background-color: var(--hero-accent);
|
|
49
|
-
border: none;
|
|
50
|
-
color: black;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.ctaButton.button--primary:hover {
|
|
54
|
-
background-color: #33e3a6;
|
|
55
|
-
box-shadow: 0 0 0 4px rgba(62, 244, 182, 0.3);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.ctaButton.button--outline {
|
|
59
|
-
border-color: var(--hero-accent);
|
|
60
|
-
color: var(--hero-accent);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.ctaButton.button--outline:hover {
|
|
64
|
-
background-color: rgba(62, 244, 182, 0.1);
|
|
65
|
-
border-color: var(--hero-accent);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/* Mobile adjustments */
|
|
69
|
-
@media (max-width: 768px) {
|
|
70
|
-
.heroTitle {
|
|
71
|
-
font-size: 2.25rem;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.heroSubtitle {
|
|
75
|
-
font-size: 1rem;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Version: 1.4.2
|
|
3
|
-
* Path: docs-site/src/css/custom.css
|
|
4
|
-
* Description: Robust theme override for SSR support in Docusaurus static build with correct light/dark contrast.
|
|
5
|
-
* Author: Ali Kahwaji
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/* ----------------------
|
|
9
|
-
* Explicit Light Theme Scope (SSR Safe)
|
|
10
|
-
* ---------------------- */
|
|
11
|
-
html[data-theme='light'],
|
|
12
|
-
:root {
|
|
13
|
-
--ifm-color-primary: #3EF4B6;
|
|
14
|
-
--ifm-color-primary-dark: #33e3a6;
|
|
15
|
-
--ifm-color-primary-darker: #2fd29b;
|
|
16
|
-
--ifm-color-primary-light: #55f7c0;
|
|
17
|
-
--ifm-color-primary-lighter: #69f9ca;
|
|
18
|
-
--ifm-color-primary-lightest: #86fbd6;
|
|
19
|
-
|
|
20
|
-
--ifm-background-color: #ffffff;
|
|
21
|
-
--ifm-navbar-background-color: #f8f8f8;
|
|
22
|
-
--ifm-footer-background-color: #f4f4f4;
|
|
23
|
-
|
|
24
|
-
--ifm-font-color-base: #1a1a1a;
|
|
25
|
-
--ifm-heading-color: #121212;
|
|
26
|
-
--ifm-link-color: var(--ifm-color-primary);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/* ----------------------
|
|
30
|
-
* Dark Theme Overrides
|
|
31
|
-
* ---------------------- */
|
|
32
|
-
html[data-theme='dark'] {
|
|
33
|
-
--ifm-background-color: #0d0d0d;
|
|
34
|
-
--ifm-navbar-background-color: #151515;
|
|
35
|
-
--ifm-footer-background-color: #121212;
|
|
36
|
-
|
|
37
|
-
--ifm-font-color-base: #f2f2f2;
|
|
38
|
-
--ifm-heading-color: #ffffff;
|
|
39
|
-
--ifm-link-color: var(--ifm-color-primary);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/* ------------------
|
|
43
|
-
* Typography
|
|
44
|
-
* ------------------ */
|
|
45
|
-
body {
|
|
46
|
-
font-family: 'Inter', system-ui, sans-serif;
|
|
47
|
-
line-height: 1.6;
|
|
48
|
-
font-size: 16px;
|
|
49
|
-
background-color: var(--ifm-background-color);
|
|
50
|
-
color: var(--ifm-font-color-base);
|
|
51
|
-
transition: background-color 0.3s ease, color 0.3s ease;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/* ------------------
|
|
55
|
-
* Buttons
|
|
56
|
-
* ------------------ */
|
|
57
|
-
.button--primary {
|
|
58
|
-
background-color: var(--ifm-color-primary);
|
|
59
|
-
color: black;
|
|
60
|
-
border: none;
|
|
61
|
-
font-weight: 500;
|
|
62
|
-
transition: background-color 0.2s ease;
|
|
63
|
-
}
|
|
64
|
-
.button--primary:hover {
|
|
65
|
-
background-color: var(--ifm-color-primary-dark);
|
|
66
|
-
box-shadow: 0 0 0 3px rgba(62, 244, 182, 0.25);
|
|
67
|
-
}
|
|
68
|
-
.button--outline {
|
|
69
|
-
border: 2px solid var(--ifm-color-primary);
|
|
70
|
-
color: var(--ifm-color-primary);
|
|
71
|
-
}
|
|
72
|
-
.button--outline:hover {
|
|
73
|
-
background-color: rgba(62, 244, 182, 0.05);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/* ------------------
|
|
77
|
-
* Code Blocks
|
|
78
|
-
* ------------------ */
|
|
79
|
-
pre {
|
|
80
|
-
background-color: #f5f5f5;
|
|
81
|
-
border-radius: 8px;
|
|
82
|
-
padding: 1rem;
|
|
83
|
-
font-size: 0.95rem;
|
|
84
|
-
overflow-x: auto;
|
|
85
|
-
}
|
|
86
|
-
html[data-theme='dark'] pre {
|
|
87
|
-
background-color: #1e1e1e;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/* ------------------
|
|
91
|
-
* Scrollbars
|
|
92
|
-
* ------------------ */
|
|
93
|
-
::-webkit-scrollbar {
|
|
94
|
-
width: 8px;
|
|
95
|
-
height: 8px;
|
|
96
|
-
}
|
|
97
|
-
::-webkit-scrollbar-thumb {
|
|
98
|
-
background-color: rgba(62, 244, 182, 0.45);
|
|
99
|
-
border-radius: 4px;
|
|
100
|
-
}
|
|
101
|
-
::-webkit-scrollbar-track {
|
|
102
|
-
background: transparent;
|
|
103
|
-
}
|
|
104
|
-
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// docs-site/src/pages/index.js
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import Layout from '@theme/Layout';
|
|
5
|
-
import HomepageHeader from '@site/src/components/HomepageHeader';
|
|
6
|
-
import HomepageFeatures from '@site/src/components/HomepageFeatures';
|
|
7
|
-
|
|
8
|
-
export default function Home() {
|
|
9
|
-
return (
|
|
10
|
-
<Layout
|
|
11
|
-
title="RAG Pipeline Utils"
|
|
12
|
-
description="Composable RAG pipelines, dashboards, and plugin architecture for Node.js"
|
|
13
|
-
>
|
|
14
|
-
<HomepageHeader />
|
|
15
|
-
<main>
|
|
16
|
-
<HomepageFeatures />
|
|
17
|
-
</main>
|
|
18
|
-
</Layout>
|
|
19
|
-
);
|
|
20
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CSS files with the .module.css suffix will be treated as CSS modules
|
|
3
|
-
* and scoped locally.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
.heroBanner {
|
|
7
|
-
padding: 4rem 0;
|
|
8
|
-
text-align: center;
|
|
9
|
-
position: relative;
|
|
10
|
-
overflow: hidden;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@media screen and (max-width: 996px) {
|
|
14
|
-
.heroBanner {
|
|
15
|
-
padding: 2rem;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.buttons {
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: center;
|
|
22
|
-
justify-content: center;
|
|
23
|
-
}
|
|
File without changes
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<!-- docs-site/static/img/logo.svg -->
|
|
2
|
-
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<circle cx="32" cy="32" r="30" stroke="#3EF4B6" stroke-width="4"/>
|
|
4
|
-
<path d="M22 32C22 26.48 26.48 22 32 22C37.52 22 42 26.48 42 32C42 37.52 37.52 42 32 42C26.48 42 22 37.52 22 32Z" fill="#3EF4B6"/>
|
|
5
|
-
<line x1="44" y1="44" x2="58" y2="58" stroke="#3EF4B6" stroke-width="4" stroke-linecap="round"/>
|
|
6
|
-
</svg>
|
|
Binary file
|
package/jest.config.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Version: 0.1.0
|
|
3
|
-
* Path: /jest.config.js
|
|
4
|
-
* Description: Jest configuration for native ESM test support
|
|
5
|
-
* Author: Ali Kahwaji
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
// jest.config.js
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
transform: {
|
|
12
|
-
'^.+\\.[t|j]sx?$': 'babel-jest', // Existing transform for JS files
|
|
13
|
-
'\\.(png|jpg|jpeg|gif|eot|ttf|woff|woff2)$': 'jest-transform-stub', // this for static files
|
|
14
|
-
},
|
|
15
|
-
verbose: true,
|
|
16
|
-
testEnvironment: 'node',
|
|
17
|
-
collectCoverage: true,
|
|
18
|
-
coverageDirectory: 'coverage',
|
|
19
|
-
moduleFileExtensions: ['js', 'json'],
|
|
20
|
-
testMatch: ['**/__tests__/**/*.test.js'],
|
|
21
|
-
roots: ['<rootDir>/__tests__'],
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
|
package/plugin.config.json
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"loader": {
|
|
3
|
-
"pdf": "./src/mocks/pdf-loader.js"
|
|
4
|
-
},
|
|
5
|
-
"embedder": {
|
|
6
|
-
"openai": "./src/mocks/openai-embedder.js"
|
|
7
|
-
},
|
|
8
|
-
"retriever": {
|
|
9
|
-
"pinecone": "./src/mocks/pinecone-retriever.js"
|
|
10
|
-
},
|
|
11
|
-
"llm": {
|
|
12
|
-
"openai-gpt-4": "./src/mocks/openai-llm.js"
|
|
13
|
-
}
|
|
14
|
-
}
|
package/public/index.html
DELETED
|
File without changes
|
|
File without changes
|
package/public/src/App.jsx
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Version: 0.1.0
|
|
3
|
-
* Path: /public/src/App.jsx
|
|
4
|
-
* Description: Evaluation results dashboard UI
|
|
5
|
-
* Author: Ali Kahwaji
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { useEffect, useState } from 'react';
|
|
9
|
-
|
|
10
|
-
export default function App() {
|
|
11
|
-
const [results, setResults] = useState([]);
|
|
12
|
-
const [summary, setSummary] = useState({ passRate: 0, avgBLEU: 0, avgROUGE: 0 });
|
|
13
|
-
|
|
14
|
-
useEffect(() => {
|
|
15
|
-
fetch('/results/sample-eval.json')
|
|
16
|
-
.then(res => res.json())
|
|
17
|
-
.then(data => {
|
|
18
|
-
setResults(data);
|
|
19
|
-
|
|
20
|
-
const total = data.length;
|
|
21
|
-
const passCount = data.filter(r => r.success).length;
|
|
22
|
-
const avgBLEU = data.reduce((s, r) => s + r.scores.bleu, 0) / total;
|
|
23
|
-
const avgROUGE = data.reduce((s, r) => s + r.scores.rouge, 0) / total;
|
|
24
|
-
|
|
25
|
-
setSummary({
|
|
26
|
-
passRate: (passCount / total * 100).toFixed(1),
|
|
27
|
-
avgBLEU: avgBLEU.toFixed(2),
|
|
28
|
-
avgROUGE: avgROUGE.toFixed(2)
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
}, []);
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<main className="max-w-6xl mx-auto p-6">
|
|
35
|
-
<h1 className="text-3xl font-bold mb-4">RAG Evaluation Dashboard</h1>
|
|
36
|
-
|
|
37
|
-
<div className="mb-6 p-4 border rounded shadow bg-white">
|
|
38
|
-
<h2 className="text-xl font-semibold mb-2">Summary</h2>
|
|
39
|
-
<p> Pass Rate: <strong>{summary.passRate}%</strong></p>
|
|
40
|
-
<p> Avg BLEU: <strong>{summary.avgBLEU}</strong></p>
|
|
41
|
-
<p> Avg ROUGE: <strong>{summary.avgROUGE}</strong></p>
|
|
42
|
-
</div>
|
|
43
|
-
|
|
44
|
-
{results.map((res, i) => (
|
|
45
|
-
<div key={i} className="mb-4 p-4 border-l-4 rounded bg-white shadow border-l-gray-300">
|
|
46
|
-
<h3 className="font-bold text-lg">Prompt {i + 1}</h3>
|
|
47
|
-
<p className="mt-2"><strong>Prompt:</strong> {res.prompt}</p>
|
|
48
|
-
<p><strong>Expected:</strong> {res.expected}</p>
|
|
49
|
-
<p><strong>Actual:</strong> {res.actual}</p>
|
|
50
|
-
<p> BLEU: <strong>{res.scores.bleu.toFixed(2)}</strong></p>
|
|
51
|
-
<p> ROUGE: <strong>{res.scores.rouge.toFixed(2)}</strong></p>
|
|
52
|
-
<p>Pass: <strong className={res.success ? 'text-green-600' : 'text-red-600'}>{res.success ? 'Yes' : 'No'}</strong></p>
|
|
53
|
-
</div>
|
|
54
|
-
))}
|
|
55
|
-
</main>
|
|
56
|
-
);
|
|
57
|
-
}
|
package/release.config.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Version: 0.1.0
|
|
3
|
-
* Description: Semantic Release configuration for CI/CD automation with changelog, versioning, GitHub releases, and npm publishing.
|
|
4
|
-
* Author: Ali Kahwaji
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
branches: ['main'],
|
|
9
|
-
repositoryUrl: 'https://github.com/DevilsDev/rag-pipeline-utils',
|
|
10
|
-
|
|
11
|
-
plugins: [
|
|
12
|
-
'@semantic-release/commit-analyzer',
|
|
13
|
-
'@semantic-release/release-notes-generator',
|
|
14
|
-
[
|
|
15
|
-
'@semantic-release/changelog',
|
|
16
|
-
{
|
|
17
|
-
changelogFile: 'CHANGELOG.md',
|
|
18
|
-
changelogTitle: '# Changelog',
|
|
19
|
-
},
|
|
20
|
-
],
|
|
21
|
-
[
|
|
22
|
-
'@semantic-release/npm',
|
|
23
|
-
{
|
|
24
|
-
npmPublish: true,
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
[
|
|
28
|
-
'@semantic-release/git',
|
|
29
|
-
{
|
|
30
|
-
assets: ['package.json', 'package-lock.json', 'CHANGELOG.md'],
|
|
31
|
-
message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
'@semantic-release/github',
|
|
35
|
-
],
|
|
36
|
-
};
|