@devilsdev/rag-pipeline-utils 2.6.1 → 2.7.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 (90) hide show
  1. package/BENCHMARKS.md +7 -1
  2. package/CHANGELOG.md +135 -0
  3. package/README.md +37 -24
  4. package/dist/index.cjs +4164 -1825
  5. package/dist/index.d.ts +265 -256
  6. package/dist/index.mjs +1 -1
  7. package/dist/types/cache/memory-cache.d.ts +4 -1
  8. package/dist/types/cache/redis-cache.d.ts +4 -1
  9. package/dist/types/cli/services/instrument.d.ts +14 -0
  10. package/dist/types/cli/services/rag-service.d.ts +140 -0
  11. package/dist/types/cli/shared/config-context.d.ts +9 -0
  12. package/dist/types/config/component-factory.d.ts +57 -0
  13. package/dist/types/config/enhanced-ragrc-schema.d.ts +648 -0
  14. package/dist/types/config/load-config.d.ts +18 -0
  15. package/dist/types/config/normalize-config.d.ts +9 -0
  16. package/dist/types/core/observability/event-logger.d.ts +211 -0
  17. package/dist/types/core/observability/metrics.d.ts +585 -0
  18. package/dist/types/core/performance/parallel-processor.d.ts +92 -0
  19. package/dist/types/core/plugin-registry.d.ts +5 -0
  20. package/dist/types/dag/core/execution-scheduler.d.ts +3 -1
  21. package/dist/types/dag/dag-engine.d.ts +15 -2
  22. package/dist/types/dev/dev-server.d.ts +136 -0
  23. package/dist/types/dev/hot-reload.d.ts +226 -0
  24. package/dist/types/ecosystem/plugin-analytics-dashboard.d.ts +141 -0
  25. package/dist/types/ecosystem/plugin-hub.d.ts +161 -0
  26. package/dist/types/ecosystem/plugin-installer.d.ts +40 -0
  27. package/dist/types/ecosystem/plugin-probe.d.ts +21 -0
  28. package/dist/types/ecosystem/plugin-scanner.d.ts +30 -0
  29. package/dist/types/ecosystem/tar-extract.d.ts +24 -0
  30. package/dist/types/enterprise/audit-logging.d.ts +217 -0
  31. package/dist/types/evaluate/compare.d.ts +140 -0
  32. package/dist/types/evaluate/dataset.d.ts +43 -0
  33. package/dist/types/evaluate/evaluator.d.ts +14 -0
  34. package/dist/types/evaluate/report.d.ts +56 -0
  35. package/dist/types/evaluate/synthetic.d.ts +64 -0
  36. package/dist/types/loader/csv-loader.d.ts +10 -0
  37. package/dist/types/loader/document-reader.d.ts +18 -0
  38. package/dist/types/loader/html-loader.d.ts +21 -0
  39. package/dist/types/loader/markdown-loader.d.ts +21 -0
  40. package/dist/types/retrieval/bm25-search.d.ts +4 -0
  41. package/dist/types/retrieval/file-vector-store.d.ts +4 -1
  42. package/dist/types/retrieval/hybrid-retriever.d.ts +4 -0
  43. package/dist/types/retrieval/pgvector-retriever.d.ts +123 -0
  44. package/dist/types/retrieval/qdrant-retriever.d.ts +106 -0
  45. package/dist/types/security/validator.d.ts +11 -1
  46. package/dist/types/testing.d.ts +2 -0
  47. package/dist/types/utils/batch-processor.d.ts +205 -0
  48. package/dist/types/utils/connection-pool.d.ts +158 -0
  49. package/dist/types/utils/error-formatter.d.ts +312 -0
  50. package/dist/types/utils/logger.d.ts +29 -4
  51. package/dist/types/utils/rate-limiter.d.ts +13 -8
  52. package/dist/types/utils/retry.d.ts +10 -0
  53. package/package.json +13 -3
  54. package/src/cache/memory-cache.js +4 -1
  55. package/src/cache/redis-cache.js +4 -1
  56. package/src/cli/enhanced-cli-commands.js +79 -0
  57. package/src/cli/handlers/ai-handler.js +2 -2
  58. package/src/cli/handlers/eval-handler.js +201 -0
  59. package/src/cli/handlers/generate-handler.js +103 -0
  60. package/src/cli/services/benchmark.js +2 -2
  61. package/src/cli/services/rag-service.js +59 -10
  62. package/src/cli/shared/cli-utils.js +40 -1
  63. package/src/config/component-factory.js +32 -0
  64. package/src/connectors/local-embedder.js +20 -13
  65. package/src/core/observability/event-logger.js +135 -1
  66. package/src/core/observability/metrics.js +223 -5
  67. package/src/core/performance/parallel-processor.js +2 -0
  68. package/src/core/plugin-registry.js +5 -1
  69. package/src/dag/core/execution-scheduler.js +2 -0
  70. package/src/dag/dag-engine.js +13 -0
  71. package/src/dev/dev-server.js +6 -0
  72. package/src/ecosystem/plugin-hub.js +4 -0
  73. package/src/enterprise/audit-logging.js +5 -0
  74. package/src/evaluate/compare.js +395 -0
  75. package/src/evaluate/dataset.js +207 -0
  76. package/src/evaluate/report.js +350 -0
  77. package/src/evaluate/synthetic.js +246 -0
  78. package/src/index.js +17 -0
  79. package/src/retrieval/bm25-search.js +4 -0
  80. package/src/retrieval/file-vector-store.js +4 -1
  81. package/src/retrieval/hybrid-retriever.js +4 -0
  82. package/src/retrieval/pgvector-retriever.js +420 -0
  83. package/src/retrieval/qdrant-retriever.js +361 -0
  84. package/src/security/validator.js +8 -0
  85. package/src/testing.js +2 -0
  86. package/src/utils/batch-processor.js +7 -3
  87. package/src/utils/error-formatter.js +48 -20
  88. package/src/utils/logger.js +31 -1
  89. package/src/utils/rate-limiter.js +9 -4
  90. package/src/utils/retry.js +10 -1
package/BENCHMARKS.md CHANGED
@@ -2,7 +2,13 @@
2
2
 
3
3
  This document describes **how we measure** performance in
4
4
  `@devilsdev/rag-pipeline-utils` and **how you reproduce the numbers**
5
- yourself. It deliberately does not publish a headline "N ops/sec" figure.
5
+ yourself.
6
+
7
+ **Published results:** pipeline overhead and vector store latency and
8
+ recall (`benchmarks/speed.js`, run in CI against pgvector and Qdrant) are
9
+ on the [Benchmarks page](https://devilsdev.github.io/rag-pipeline-utils/docs/Benchmarks),
10
+ generated from `benchmarks/results/`. The rest of this document covers the
11
+ engine micro-benchmark suite and benchmarking your own stack.
6
12
 
7
13
  ## Philosophy
8
14
 
package/CHANGELOG.md CHANGED
@@ -11,6 +11,139 @@ page.
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [2.7.0] - 2026-10-30
15
+
16
+ ### Added
17
+
18
+ - **`validateDataset(dataset, { requireExpected, requireSourceIds })`**
19
+ checks an evaluation test set before it runs and reports every problem
20
+ with its case index, id and field, without throwing. A dataset is an
21
+ array of `{ prompt, expected, sourceIds, id, tags }` cases or
22
+ `{ cases: [...] }`; `question` and `referenceAnswer` are accepted as
23
+ aliases, and the `{ prompt, expected }` shape `evaluateRagDataset` reads
24
+ is valid unchanged. Valid datasets come back normalised in `cases`.
25
+ - **`runEvaluation(dataset, pipeline)`** runs every case with citations and
26
+ evaluation on and returns a JSON report: per-case answers, retrieved ids,
27
+ scores (faithfulness, relevance, context precision and recall,
28
+ groundedness, citation coverage, and `sourceRecall` against the case's
29
+ `sourceIds`) and per-metric means. Failed cases are recorded, not thrown;
30
+ options for `concurrency`, a per-case `timeout`, `signal` and `onCase`.
31
+ Reports record the `libraryVersion`, and `compareConfigurations` warns
32
+ when two runs used different versions, since scoring can change between
33
+ releases.
34
+ - **`compareConfigurations(dataset, { baseline, candidate })`** compares two
35
+ runs, where each side is a pipeline or a saved report, and reports
36
+ `regressed`, per-metric deltas, and the cases that now fail or dropped by
37
+ more than `caseTolerance`. `tolerance` (default 0.02) sets the allowed
38
+ drop in a metric's mean.
39
+ - **`generateSyntheticDataset(documents, { llm, count })`** drafts a test set:
40
+ an LLM writes question and answer pairs about one document at a time, and
41
+ each case records the document in `sourceIds`. Answers their document
42
+ doesn't support (by `computeFaithfulness`), repeated questions, malformed
43
+ replies and short documents are skipped and listed with a reason. Cases
44
+ are tagged `synthetic` and marked `reviewed: false`.
45
+ - **`rag-pipeline generate-dataset --output <file>`** does the same from the
46
+ index with the configured `llm`, and won't overwrite a file without
47
+ `--force`.
48
+ - **`PgVectorRetriever`** stores and searches documents in PostgreSQL with
49
+ the pgvector extension: cosine similarity, upserts in one transaction, an
50
+ HNSW index with an `efSearch` option for recall, and `removeBySource`, `delete`, `clear`, `size` and `list` for
51
+ the CLI. Pass a `pg` Pool, or a connection string with `pg` installed (an
52
+ optional peer dependency, loaded only when used). In `.ragrc.json` it is
53
+ the `pgvector` retriever and reads its connection string from
54
+ `DATABASE_URL`. It isn't cached unless you give it a `cacheKey`.
55
+ - **`QdrantRetriever`** stores and searches documents in a Qdrant
56
+ collection through its REST API, with no client package. Document ids map
57
+ to stable UUIDs, with the original id kept in the payload; writes wait
58
+ until Qdrant applies them. In `.ragrc.json` it is the `qdrant` retriever,
59
+ reading `QDRANT_URL` and `QDRANT_API_KEY`. Tested against Qdrant 1.20.
60
+ - **`rag-pipeline eval <dataset>`** runs a `.json` or `.jsonl` test set
61
+ through the configured pipeline and exits 1 when a case fails, a metric
62
+ is below its `--min metric=value`, or the run regressed from a
63
+ `--baseline` report. `--output` saves the run as a baseline, `--report`
64
+ writes a standalone HTML page (`.html`) or a Markdown summary for a pull
65
+ request comment, and `--json` prints the verdict. Also `--tolerance`,
66
+ `--case-tolerance`, `--concurrency`, `--timeout` and `--top-k`.
67
+ - **[`DevilsDev/rag-eval-action`](https://github.com/DevilsDev/rag-eval-action)**,
68
+ a GitHub Action that runs `rag-pipeline eval` on pull requests, compares
69
+ them with the default branch's report from the Actions cache, posts a
70
+ summary comment that later runs update, and fails the check when scores
71
+ drop. Its `v1` is published with this release.
72
+ - **`renderEvaluationReport`** (Markdown or HTML) and
73
+ **`evaluationVerdict`** for the same reports in code.
74
+ - `sourceIds` match a retrieved result's `id` or its `metadata.source`, so
75
+ a case can name a file when the index stores chunks of it.
76
+ - **A generated API reference** on the docs site: a page for every export,
77
+ with its methods, options and types, built from the published type
78
+ declarations by `npm run docs:api`. CI fails when it is out of date.
79
+ - **Published speed benchmarks** on the docs site: pipeline overhead, and
80
+ ingest throughput, query latency and recall@10 for `MemoryRetriever`,
81
+ `FileVectorStore`, `PgVectorRetriever` and `QdrantRetriever`, measured in
82
+ CI against real pgvector and Qdrant (`npm run bench:speed`), and
83
+ retrieval quality (nDCG@10, recall, MRR) of the offline retrievers on
84
+ BEIR SciFact (`npm run bench:quality`), where `BM25Search` matches the
85
+ published BM25 baseline. The tables are generated from the committed
86
+ reports in `benchmarks/results/`.
87
+ - `logger.info()`, `.warn()`, `.error()` and `.debug()` log through the
88
+ shared logger. The `logger` export is the logger module, so these were
89
+ undefined; `logger.logger.info()` keeps working.
90
+
91
+ ### Fixed
92
+
93
+ - **`LocalEmbedder` ignored most words on a large corpus.** When a corpus
94
+ had more distinct tokens than `maxVocabularySize` (10,000), `train()`
95
+ kept the rarest ones, mostly words that occur in a single document, so
96
+ most queries embedded to all zeros. It now keeps the most common tokens.
97
+ On BEIR SciFact nDCG@10 rose from 0.12 to 0.47. Indexes built before
98
+ keep their saved vocabulary until you ingest again; re-run `ingest` to
99
+ benefit.
100
+ - **The TypeScript declarations for the core API didn't match the code.**
101
+ Plugins written to them failed at runtime. `RetrieverPlugin.retrieve`
102
+ takes one `{ query, queryVector, topK, signal }` object,
103
+ `RerankerPlugin.rerank` takes `(query, documents)`, and `LLMPlugin.generate`
104
+ takes `(query, documents, options)` and must return the answer text: an
105
+ `LLMResponse` object became the answer `"[object Object]"`.
106
+ `PipelineRunResult` now has `answer`, `citations` and `evaluation`, and
107
+ `run()` with `options: { stream: true }` is typed to resolve a stream.
108
+ The
109
+ declarations of `loadConfig` (synchronous, takes a path), `validateRagrc`,
110
+ `normalizeConfig`, `pluginRegistry`, `createError` and `wrapError`,
111
+ `computeBLEU`, `computeROUGE` and `scoreAnswer` (token arrays,
112
+ `(actual, expected)`), `retry`, `withRetry`, `RateLimiter`,
113
+ `BatchProcessor`, `ConnectionPoolManager`, `JWTValidator`,
114
+ `PluginSignatureVerifier`, `validateInput`, `DAG`, `evaluateRagDataset`,
115
+ `HotReloadManager`, `DevServer`, `AuditLogger`, `PluginHub`, `metrics`,
116
+ `eventLogger` and `ParallelProcessor` are now generated from the source,
117
+ so they describe what each one does. A call that matched an old
118
+ declaration but not the code, such as `rerank(results, query)` or
119
+ `await loadConfig({ configPath })`, may no longer compile; it didn't
120
+ work when run.
121
+ `LLMResponse`, `LoadConfigOptions`, `DAGNode`, `DAGOptions`,
122
+ `ErrorFormatter` and `EvalResult` are deprecated.
123
+
124
+ - **The CLI didn't wait for retrievers whose methods are async**, as a
125
+ remote vector store's are: `ingest` didn't wait for `removeBySource`, so
126
+ re-ingesting a file could keep its old chunks or delete the new ones, and `generate-dataset`,
127
+ `ai feedback` and `ai benchmark` failed on `list()`. Every retriever call
128
+ is now awaited. The fitted `local` embedder with a store that can't save
129
+ its state now stops with a message instead of embedding queries with an
130
+ empty vocabulary.
131
+ - A bad option value (`--top-k 0`, `--min speed=1`) printed a stack trace;
132
+ the CLI now prints a one-line error naming the option and exits 1.
133
+
134
+ ## [2.6.2] - 2026-10-29
135
+
136
+ ### Fixed
137
+
138
+ - **`npm install` failed on machines without husky installed globally.**
139
+ Every release from 2.2.1 to 2.6.1 declared
140
+ `"postinstall": "husky install"`. husky is a development tool that isn't
141
+ installed in users' projects, so installing the package failed with
142
+ `husky: not found` (or `'husky' is not recognized` on Windows) on clean
143
+ machines and CI runners. The hook now runs from `prepare`, which npm runs
144
+ only in this repository, and the pack smoke test fails if the package
145
+ has any install-time script. No code changes.
146
+
14
147
  ## [2.6.1] - 2026-10-29
15
148
 
16
149
  Documentation only; no code changes.
@@ -567,6 +700,8 @@ First public release on the 2.4 line, introducing the v2.4 feature set.
567
700
  For release notes prior to v2.4.0, see
568
701
  [github.com/DevilsDev/rag-pipeline-utils/releases](https://github.com/DevilsDev/rag-pipeline-utils/releases).
569
702
 
703
+ [2.7.0]: https://github.com/DevilsDev/rag-pipeline-utils/releases/tag/v2.7.0
704
+ [2.6.2]: https://github.com/DevilsDev/rag-pipeline-utils/releases/tag/v2.6.2
570
705
  [2.6.1]: https://github.com/DevilsDev/rag-pipeline-utils/releases/tag/v2.6.1
571
706
  [2.6.0]: https://github.com/DevilsDev/rag-pipeline-utils/releases/tag/v2.6.0
572
707
  [2.5.0]: https://github.com/DevilsDev/rag-pipeline-utils/releases/tag/v2.5.0
package/README.md CHANGED
@@ -52,6 +52,8 @@ npm install @devilsdev/rag-pipeline-utils
52
52
 
53
53
  Requires Node.js 18 or later. The package ships CommonJS, ESM and TypeScript declarations.
54
54
 
55
+ > **`npm install` failed with `husky: not found`?** Versions 2.2.1 to 2.6.1 ran a development hook on install. Install 2.6.2 or later: `npm install @devilsdev/rag-pipeline-utils@latest`.
56
+
55
57
  ## Quick start
56
58
 
57
59
  This example runs offline: it uses the built-in TF-IDF embedder and an in-memory vector store.
@@ -141,6 +143,8 @@ npx rag-pipeline ingest ./docs # indexes .md, .html, .csv and .txt f
141
143
  npx rag-pipeline query "What is the remote work policy?"
142
144
  npx rag-pipeline serve --port 3000 # local HTTP API: GET /health, POST /query
143
145
  npx rag-pipeline doctor # checks config, API keys, plugins and the index
146
+ npx rag-pipeline generate-dataset --output tests.json # drafts a test set from the index with your llm
147
+ npx rag-pipeline eval tests.json --min faithfulness=0.8 # scores a test set; exits 1 on failure
144
148
  ```
145
149
 
146
150
  The default `local` template needs no API keys. Use `init --template openai`, `anthropic` or `ollama` to generate answers with a model. Other commands include `validate`, `hub install` for plugins and `ai benchmark` for measured latency.
@@ -206,6 +210,10 @@ console.log(report.scores); // includes contextRecall because a reference was gi
206
210
  if (report.scores.faithfulness < 0.8) process.exitCode = 1;
207
211
  ```
208
212
 
213
+ Keep the question set in a JSON file of `{ prompt, expected, sourceIds }` cases; `generateSyntheticDataset` (or `rag-pipeline generate-dataset`) drafts one from your documents for you to review. `validateDataset` checks it before a run and reports every malformed case, with its index and field; `runEvaluation` runs it and saves a JSON report, which `renderEvaluationReport` turns into Markdown or HTML; and `compareConfigurations` compares two pipelines, or a pipeline against the report saved from your main branch, and lists the cases that got worse. See the [dataset format](https://devilsdev.github.io/rag-pipeline-utils/docs/Evaluation#dataset-format).
214
+
215
+ On GitHub, [`DevilsDev/rag-eval-action`](https://github.com/DevilsDev/rag-eval-action) runs this on every pull request, compares it with your main branch and posts the summary as a comment.
216
+
209
217
  ### Check answers from another framework
210
218
 
211
219
  Already on LangChain, LlamaIndex, Mastra or the AI SDK? `checkAnswer` checks the answer your chain produced against the sources it was given, in the shape your framework returns them:
@@ -337,6 +345,8 @@ const results = await hybrid.retrieve({
337
345
  console.log(results[0].id); // "err-4012"
338
346
  ```
339
347
 
348
+ On the BEIR SciFact benchmark, `BM25Search` alone matches the published BM25 baseline (nDCG@10 0.665); fusion helps when the vector side is a strong embedder, so weight the retrievers to suit. See [retrieval quality](https://devilsdev.github.io/rag-pipeline-utils/docs/Benchmarks#retrieval-quality).
349
+
340
350
  ### Answer multi-part questions
341
351
 
342
352
  `AgenticPipeline` splits compound questions into sub-queries, retrieves for each, and self-checks the answer against the sources before returning it.
@@ -462,22 +472,22 @@ The result of `run()` is:
462
472
 
463
473
  ## Capabilities
464
474
 
465
- | Area | What you get |
466
- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
467
- | **Chunking** | `ChunkingEngine` with sentence, fixed-size, recursive, semantic and structure-aware strategies |
468
- | **Retrieval** | `MemoryRetriever`, persistent `FileVectorStore`, `BM25Search`, `HybridRetriever` (Reciprocal Rank Fusion) |
469
- | **Reranking** | `ScoringReranker`, `EmbeddingReranker` (cached), `CascadeReranker` |
470
- | **Citations** | Per-sentence source mapping, hallucination report, numeric-consistency check |
471
- | **Evaluation** | Faithfulness, relevance, context precision, context recall (with a reference), groundedness, BLEU/ROUGE, semantic similarity with any embedder |
472
- | **Integrations** | `checkAnswer` for answers from LangChain, LlamaIndex, Mastra or the AI SDK; `createAiSdkAdapter` |
473
- | **Caching** | Opt-in caches for query embeddings, retrieval and answers, in memory (`MemoryCache`) or Redis (`RedisCache`) |
474
- | **Testing** | `/testing` entry: offline `HashEmbedder`, `EchoLLM`, fixtures, `createTestPipeline()`; `validatePlugin` for plugin tests |
475
- | **Guardrails** | Injection detection with input normalisation, ACL and relevance filtering before generation, PII redaction |
476
- | **Agentic** | `QueryPlanner`, `IterativeRetriever`, `SelfCritiqueChecker`, `AgenticPipeline` |
477
- | **GraphRAG** | `KnowledgeGraph`, `EntityExtractor`, `GraphRetriever` |
478
- | **Streaming** | Token streaming with a final chunk carrying citations and evaluation; `SSEAdapter`, `WebSocketAdapter` |
479
- | **Cost** | `CostTracker`, `TokenBudget`, `CostCalculator` with sourced, overridable pricing |
480
- | **Operations** | `DevServer` HTTP API, `ExecutionTracer`, `AuditLogger`, MCP tool server (`MCPServer`) |
475
+ | Area | What you get |
476
+ | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
477
+ | **Chunking** | `ChunkingEngine` with sentence, fixed-size, recursive, semantic and structure-aware strategies |
478
+ | **Retrieval** | `MemoryRetriever`, persistent `FileVectorStore`, `PgVectorRetriever` (PostgreSQL), `QdrantRetriever`, `BM25Search`, `HybridRetriever` (Reciprocal Rank Fusion) |
479
+ | **Reranking** | `ScoringReranker`, `EmbeddingReranker` (cached), `CascadeReranker` |
480
+ | **Citations** | Per-sentence source mapping, hallucination report, numeric-consistency check |
481
+ | **Evaluation** | Faithfulness, relevance, context precision, context recall (with a reference), groundedness, BLEU/ROUGE, semantic similarity with any embedder; test sets with `validateDataset`, `runEvaluation`, `compareConfigurations`, `generateSyntheticDataset` and `rag-pipeline eval` |
482
+ | **Integrations** | `checkAnswer` for answers from LangChain, LlamaIndex, Mastra or the AI SDK; `createAiSdkAdapter` |
483
+ | **Caching** | Opt-in caches for query embeddings, retrieval and answers, in memory (`MemoryCache`) or Redis (`RedisCache`) |
484
+ | **Testing** | `/testing` entry: offline `HashEmbedder`, `EchoLLM`, fixtures, `createTestPipeline()`; `validatePlugin` for plugin tests |
485
+ | **Guardrails** | Injection detection with input normalisation, ACL and relevance filtering before generation, PII redaction |
486
+ | **Agentic** | `QueryPlanner`, `IterativeRetriever`, `SelfCritiqueChecker`, `AgenticPipeline` |
487
+ | **GraphRAG** | `KnowledgeGraph`, `EntityExtractor`, `GraphRetriever` |
488
+ | **Streaming** | Token streaming with a final chunk carrying citations and evaluation; `SSEAdapter`, `WebSocketAdapter` |
489
+ | **Cost** | `CostTracker`, `TokenBudget`, `CostCalculator` with sourced, overridable pricing |
490
+ | **Operations** | `DevServer` HTTP API, `ExecutionTracer`, `AuditLogger`, MCP tool server (`MCPServer`) |
481
491
 
482
492
  ## How it compares
483
493
 
@@ -507,6 +517,8 @@ Choose LangChain.js for the widest integration catalogue or work that goes well
507
517
  | `OllamaConnector` | ✓ | ✓ | Local models, no key |
508
518
  | `LocalEmbedder` | ✓ | | Offline TF-IDF, fitted to your corpus |
509
519
 
520
+ `PgVectorRetriever` and `QdrantRetriever` store and search documents in PostgreSQL with pgvector and in Qdrant ([vector stores](https://devilsdev.github.io/rag-pipeline-utils/docs/Concepts-Connectors#postgresql-with-pgvector)); `efSearch` trades pgvector query speed for recall. Their ingest speed, query latency and recall, measured in CI, are on the [Benchmarks page](https://devilsdev.github.io/rag-pipeline-utils/docs/Benchmarks).
521
+
510
522
  Vercel AI SDK models (any provider it supports) work as the embedder and LLM through `createAiSdkAdapter`; see [Use with other frameworks](https://devilsdev.github.io/rag-pipeline-utils/docs/Integrations).
511
523
 
512
524
  Connectors read API keys when they are created, retry only transient failures (network errors, 429, 5xx) with backoff, and send retrieved documents to the model as clearly delimited, untrusted reference data rather than as instructions.
@@ -530,22 +542,23 @@ They are still exported from the main entry in 2.x with a one-time deprecation w
530
542
 
531
543
  ## Compatibility
532
544
 
533
- | | |
534
- | -------------- | ------------------------------------------------------------------------- |
535
- | Node.js | 18, 20, 22 (Node 18 support ends with 3.0) |
536
- | Module formats | CommonJS (`require`) and ESM (`import`) |
537
- | TypeScript | Declarations for every export, including `/experimental` |
538
- | Versioning | Semantic versioning with a deprecation window, see [SEMVER.md](SEMVER.md) |
539
- | Supply chain | Published from GitHub Actions with npm provenance |
545
+ | | |
546
+ | -------------- | ---------------------------------------------------------------------------------------------------- |
547
+ | Node.js | 18, 20, 22 (Node 18 support ends with 3.0) |
548
+ | Module formats | CommonJS (`require`) and ESM (`import`) |
549
+ | TypeScript | Declarations for every export, including `/experimental`, compiled and run against the package in CI |
550
+ | Versioning | Semantic versioning with a deprecation window, see [SEMVER.md](SEMVER.md) |
551
+ | Supply chain | Published from GitHub Actions with npm provenance |
540
552
 
541
553
  ## Documentation
542
554
 
543
555
  - [Documentation site](https://devilsdev.github.io/rag-pipeline-utils/): guides, API reference and deployment
544
556
  - [CLI reference](https://devilsdev.github.io/rag-pipeline-utils/docs/CLI)
545
557
  - [API reference](https://devilsdev.github.io/rag-pipeline-utils/docs/API-Reference)
558
+ - [Generated API reference](https://devilsdev.github.io/rag-pipeline-utils/docs/api): every export, with its methods, options and types
546
559
  - [Evaluation guide](https://devilsdev.github.io/rag-pipeline-utils/docs/Evaluation)
547
560
  - [Examples](examples/): basic pipeline, OpenAI with Pinecone, and a deployable Fastify service ([run the basic pipeline in your browser](https://stackblitz.com/github/DevilsDev/rag-pipeline-utils/tree/main/examples/basic-pipeline))
548
- - [Changelog](CHANGELOG.md) and [benchmarks methodology](BENCHMARKS.md)
561
+ - [Changelog](CHANGELOG.md), [benchmark results](https://devilsdev.github.io/rag-pipeline-utils/docs/Benchmarks) and [methodology](BENCHMARKS.md)
549
562
 
550
563
  ## Security
551
564