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
488
Last 30 days
8394th
1.4K
Last 90 days
4.5K
Last year
Trend: -3.2% (30d vs prior 30d)
CRAN Check Status
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
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