@agentskit/rag
Advanced tools
@@ -128,2 +128,3 @@ 'use strict'; | ||
| } | ||
| var RAG_DOCS_URL = "https://www.agentskit.io/docs/data/rag"; | ||
| var RagErrorCodes = { | ||
@@ -139,3 +140,3 @@ /** A loader's HTTP fetch returned a non-OK status. */ | ||
| constructor(options) { | ||
| super(options); | ||
| super({ docsUrl: RAG_DOCS_URL, ...options }); | ||
| this.name = "RagError"; | ||
@@ -142,0 +143,0 @@ } |
@@ -126,2 +126,3 @@ import { AgentsKitError, generateId } from '@agentskit/core'; | ||
| } | ||
| var RAG_DOCS_URL = "https://www.agentskit.io/docs/data/rag"; | ||
| var RagErrorCodes = { | ||
@@ -137,3 +138,3 @@ /** A loader's HTTP fetch returned a non-OK status. */ | ||
| constructor(options) { | ||
| super(options); | ||
| super({ docsUrl: RAG_DOCS_URL, ...options }); | ||
| this.name = "RagError"; | ||
@@ -140,0 +141,0 @@ } |
+2
-1
@@ -128,2 +128,3 @@ 'use strict'; | ||
| } | ||
| var RAG_DOCS_URL = "https://www.agentskit.io/docs/data/rag"; | ||
| var RagErrorCodes = { | ||
@@ -139,3 +140,3 @@ /** A loader's HTTP fetch returned a non-OK status. */ | ||
| constructor(options) { | ||
| super(options); | ||
| super({ docsUrl: RAG_DOCS_URL, ...options }); | ||
| this.name = "RagError"; | ||
@@ -142,0 +143,0 @@ } |
+2
-1
@@ -85,2 +85,3 @@ import { chunkText } from './chunk-K6CR4AHC.js'; | ||
| } | ||
| var RAG_DOCS_URL = "https://www.agentskit.io/docs/data/rag"; | ||
| var RagErrorCodes = { | ||
@@ -96,3 +97,3 @@ /** A loader's HTTP fetch returned a non-OK status. */ | ||
| constructor(options) { | ||
| super(options); | ||
| super({ docsUrl: RAG_DOCS_URL, ...options }); | ||
| this.name = "RagError"; | ||
@@ -99,0 +100,0 @@ } |
+3
-3
| { | ||
| "name": "@agentskit/rag", | ||
| "version": "0.5.2", | ||
| "version": "0.5.3", | ||
| "description": "Plug-and-play retrieval-augmented generation for AgentsKit.", | ||
@@ -51,3 +51,3 @@ "keywords": [ | ||
| "dependencies": { | ||
| "@agentskit/core": "1.12.7" | ||
| "@agentskit/core": "1.12.8" | ||
| }, | ||
@@ -71,3 +71,3 @@ "devDependencies": { | ||
| "license": "MIT", | ||
| "homepage": "https://www.agentskit.io/docs/packages/rag", | ||
| "homepage": "https://www.agentskit.io/docs/reference/packages/rag", | ||
| "repository": { | ||
@@ -74,0 +74,0 @@ "type": "git", |
+4
-4
@@ -21,3 +21,3 @@ # @agentskit/rag | ||
| - Package metadata and tests live under `packages/rag/`. | ||
| - Package guide: https://www.agentskit.io/docs/packages/rag | ||
| - Package guide: https://www.agentskit.io/docs/reference/packages/rag | ||
| - Stability map: [docs/STABILITY.md](../../docs/STABILITY.md) | ||
@@ -34,3 +34,3 @@ | ||
| Docs: [package guide](https://www.agentskit.io/docs/packages/rag) · [agent handoff](https://github.com/AgentsKit-io/agentskit/blob/main/llms.txt) | ||
| Docs: [package guide](https://www.agentskit.io/docs/reference/packages/rag) · [agent handoff](https://github.com/AgentsKit-io/agentskit/blob/main/llms.txt) | ||
@@ -99,4 +99,4 @@ ## Why rag | ||
| - Works with any `EmbedFn` and any `VectorMemory`. | ||
| - **Rerankers:** `createRerankedRetriever` (Cohere Rerank, BGE, BM25 default), `createHybridRetriever` (vector + BM25 blend), standalone `bm25Score`. [Recipe](https://www.agentskit.io/docs/recipes/rag-reranking). | ||
| - **Document loaders:** `loadUrl`, `loadGitHubFile`, `loadGitHubTree`, `loadNotionPage`, `loadConfluencePage`, `loadGoogleDriveFile`, `loadPdf` (BYO parser). [Recipe](https://www.agentskit.io/docs/recipes/doc-loaders). | ||
| - **Rerankers:** `createRerankedRetriever` (Voyage, Jina, custom `RerankFn`, BM25 default), `createHybridRetriever` (vector + BM25 blend), standalone `bm25Score`. [Recipe](https://www.agentskit.io/docs/reference/recipes/rag-reranking). | ||
| - **Document loaders:** `loadUrl`, `loadGitHubFile`, `loadGitHubTree`, `loadNotionPage`, `loadConfluencePage`, `loadGoogleDriveFile`, `loadPdf` (BYO parser). [Recipe](https://www.agentskit.io/docs/reference/recipes/doc-loaders). | ||
| - **Loader resilience:** HTTP/network and response-body read/parse failures surface as `RagError` (`AK_RAG_LOAD_FAILED`). Optional `signal` aborts (including mid-body reads) are never swallowed as a per-object skip. Tree/list loaders may return partial success when at least one eligible download succeeded; if every attempted eligible download failed, they throw. Missing/invalid S3 object bodies count as failed downloads. Pagination that reports more data without a new cursor/token throws (no silent truncation). `loadNotionPage` follows Notion `has_more` / `next_cursor` with `start_cursor` until complete (preserving block order; incomplete or repeated cursors throw). Non-positive / non-finite `maxFiles` yields `[]`. | ||
@@ -103,0 +103,0 @@ - **Score contracts:** scoreless search/rerank results keep order. When any score is present, every result must have a finite numeric score and is sorted descending — mixed or non-finite scores throw (never fabricate `-Infinity`). Malformed Voyage/Jina/custom reranker output throws `AK_RAG_RERANK_FAILED`. Optional `signal` on `voyageReranker` / `jinaReranker` is forwarded to `fetch`; request/body aborts remain `AK_RAG_RERANK_FAILED`. `bm25Score` sanitizes invalid `k1`/`b` to documented defaults and always emits finite scores. Hybrid relative weights are normalized to a finite pair that sums to 1 (both zero → 0.5/0.5). |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
542367
0.19%4058
0.1%+ Added
- Removed
Updated