tidyprompt
Prompt Large Language Models and Enhance Their Functionality
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
238
Last 30 days
13565th
238
Last 90 days
238
Last year
CRAN Check Status
Show all 14 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-macos-arm64 | OK |
| r-devel-windows-x86_64 | OK |
| r-oldrel-macos-arm64 | OK |
| r-oldrel-macos-x86_64 | OK |
| r-oldrel-windows-x86_64 | ERROR |
| 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 details (14 non-OK)
*
*
*
*
*
*
*
*
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 found in resource path Error: processing vignette 'getting_started.Rmd' failed with diagnostics: pandoc document conversion failed with error 99 --- failed re-building 'getting_started.Rmd' --- re-building 'sentiment_analysis.Rmd' using rmarkdown File ../man/figures/plot_sentiment_analysis-1.png not found in resource path Error: processing vignette 'sentiment_analysis.Rmd' failed with diagnostics: pandoc document conversion failed with error 99 --- failed re-building 'sentiment_analysis.Rmd' --- re-building '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
*
*
*
*
*
Check History
ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 9, 2026
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 found in resource path Error: processing vignette 'getting_started.Rmd' failed with diagnostics: pandoc document conversion failed with error 99 --- failed re-building 'getting_started.Rmd' --- re-building 'sentiment_analysis.Rmd' using rmarkdown Fil