Skip to content

ragnar

Retrieval-Augmented Generation (RAG) Workflows

v0.3.0 · Jan 23, 2026 · MIT + file LICENSE

Description

Provides tools for implementing Retrieval-Augmented Generation (RAG) workflows with Large Language Models (LLM). Includes functions for document processing, text chunking, embedding generation, storage management, and content retrieval. Supports various document types and embedding providers ('Ollama', 'OpenAI'), with 'DuckDB' as the default storage backend. Integrates with the 'ellmer' package to equip chat objects with retrieval capabilities. Designed to offer both sensible defaults and customization options with transparent access to intermediate outputs. For a review of retrieval-augmented generation methods, see Gao et al. (2023) "Retrieval-Augmented Generation for Large Language Models: A Survey" <doi:10.48550/arXiv.2312.10997>.

Downloads

CRAN

1.1K

Last 30 days

3535th

4.1K

Last 90 days

12.5K

Last year

Trend: -28.3% (30d vs prior 30d)

r2u CRAN

35

Last 30 days

519

Last 90 days

1.6K

Last year

Trend: -87% (30d vs prior 30d)

autoCRAN

1

Last 7 days

15

Last 30 days

1

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 23, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 20, 2026
ERROR r-devel-linux-x86_64-fedora-gcc

whether the package can be loaded

Loading this package had a fatal error status code 1
Loading log:
Error: package or namespace load failed for ‘ragnar’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘xml2’
Execution halted
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 9, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 8, 2026
ERROR r-devel-linux-x86_64-debian-gcc

package dependencies

Package required but not available: ‘dbplyr’

See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
manual.
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE May 24, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE May 17, 2026
ERROR r-release-linux-x86_64

package dependencies

Package required but not available: ‘duckdb’

See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
manual.
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE May 15, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE May 13, 2026
ERROR r-devel-linux-x86_64-debian-gcc

package dependencies

Package required but not available: ‘duckdb’

See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
manual.
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Code

Structure

Lines of code

11,749

Files

112

Compiled share

0.8%

Has compiled src

Yes

Language breakdown

R 7,574 (64.5%)C/C++/src 91 (0.8%)Tests 1,573 (13.4%)Docs 2,058 (17.5%)Vignettes 453 (3.9%)

API

Exported functions

36

Internal functions

146

Recent export changes

v0.3.0+5 embed_azure_openai, embed_snowflake, mcp_serve_store +2 more
v0.2.1+2 embed_google_gemini, embed_lm_studio

Testing & CI

Has tests

Yes

Test-to-code ratio

0.21

testthat edition

3

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

82.1%

\dontrun example ratio

17.6%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

18.2%

Unsafe pattern score

0

Dep constraint coverage

18.2%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

4.3.0

System requirements

C++ standard

License

MIT + file LICENSE

License flags

SPDX valid, OSI approved

History

Versions

4

First release

2025-05-30

Latest release

2026-01-23

Avg cadence

43 days

Cold removal rate

100%

Dep drift

15

LOC over versions

v0.1.0: 6,432 LOCv0.2.0: 9,778 LOCv0.2.1: 10,100 LOCv0.3.0: 11,749 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Dependency Network

Dependencies Reverse dependencies blob cli commonmark curl DBI mirai dbplyr dplyr duckdb glue httr2 jsonlite reticulate rlang rvest +6 more dependencies ragnar

Version History

5 tracked
new 0.3.0 Mar 10, 2026
updated 0.3.0 ← 0.2.1 diff Jan 22, 2026
updated 0.2.1 ← 0.2.0 diff Aug 18, 2025
updated 0.2.0 ← 0.1.0 diff Jul 11, 2025
new 0.1.0 May 29, 2025