Skip to content

tidyprompt

Prompt Large Language Models and Enhance Their Functionality

v0.4.0 · Apr 21, 2026 · GPL (>= 3) | file LICENSE

Description

Easily construct prompts and associated logic for interacting with large language models (LLMs). 'tidyprompt' introduces the concept of prompt wraps, which are building blocks that you can use to quickly turn a simple prompt into a complex one. Prompt wraps do not just modify the prompt text, but also add extraction and validation functions that will be applied to the response of the LLM. This ensures that the user gets the desired output. 'tidyprompt' can add various features to prompts and their evaluation by LLMs, such as structured output, automatic feedback, retries, reasoning modes, autonomous R function calling, and R code generation and evaluation. It is designed to be compatible with any LLM provider that offers chat completion.

Downloads

488

Last 30 days

8394th

1.4K

Last 90 days

4.5K

Last year

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

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 12 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 25, 2026
ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 10, 2026
ERROR r-oldrel-windows-x86_64

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building 'creating_prompt_wraps.Rmd' using rmarkdown
--- finished re-building 'creating_prompt_wraps.Rmd'

--- re-building 'getting_started.Rmd' using rmarkdown
File ../man/figures/answer_using_r1-1.png not f
...[truncated]...
lding 'streaming_shiny_ipc.Rmd' using rmarkdown
--- finished re-building 'streaming_shiny_ipc.Rmd'

SUMMARY: processing the following files failed:
  'getting_started.Rmd' 'sentiment_analysis.Rmd'

Error: Vignette re-building failed.
Execution halted

Reverse Dependencies (1)

imports

Dependency Network

Dependencies Reverse dependencies dplyr glue httr2 jsonlite stringr cli R6 rlang S7 llmhelper tidyprompt

Version History

6 tracked
updated 0.4.0 ← 0.3.0 diff Apr 21, 2026
new 0.3.0 Mar 10, 2026
updated 0.3.0 ← 0.2.0 diff Nov 29, 2025
updated 0.2.0 ← 0.1.0 diff Aug 24, 2025
updated 0.1.0 ← 0.0.1 diff Aug 17, 2025
new 0.0.1 Jan 7, 2025