Skip to content

v3.3.0

Latest

Choose a tag to compare

@alikahwaji alikahwaji released this 03 Nov 21:05
· 5 commits to main since this release
6c16ac6

A minor release with no breaking changes. The grounding check now catches answers that contradict their source, and the checks come to the tools you already use.

npm install @devilsdev/rag-pipeline-utils@^3.3.0

Highlights

  • Grounding catches negation. "Full-time employees never receive paid vacation" is no longer grounded by a source that says they get twenty days. Each sentence is compared with the closest source sentence; checkAnswer, the evaluation metrics, rag-pipeline eval and the guardrails all use it, and checkPolarityConsistency exposes it. Some answers that passed before now fail, on purpose. Evaluation
  • AI SDK middleware. wrapLanguageModel({ model, middleware: groundingMiddleware({ retriever }) }) adds retrieval, answer checks and guardrails to any Vercel AI SDK model. generateText and streamText stay as they are; the report is in providerMetadata.ragPipeline and the passages in sources. Tested with AI SDK 6 and 7. Middleware
  • Matchers for Jest and Vitest. expect.extend(ragMatchers) from /testing adds toBeGroundedIn, toCite and toContainNoPII. Matchers
  • Mastra. createMastraScorer turns the metrics into Mastra scorers that make no model calls; createMastraGuardrails is a processor that stops a run on prompt injection and redacts PII. Mastra
  • Coming from LlamaIndex.TS. LlamaIndex.TS is deprecated. The comparison now covers LangChain.js, Mastra and the AI SDK, and a migration guide maps its concepts.

Also

  • Issue templates and a Community plugins section.
  • Development dependencies updated (88 of 99 Dependabot alerts closed); the published package still installs with no known vulnerabilities.

The four scoped packages (@devilsdev/rag-core, -connectors, -eval, -guardrails) are released at 3.3.0 too. Full details: CHANGELOG · Blog post