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.
Version: | 0.0.1 |
Imports: | dplyr, glue, httr2, jsonlite, stringr, utils, cli |
Suggests: | knitr, rmarkdown, testthat (≥ 3.0.0), here, callr, skimr, jsonvalidate, tidyjson, DBI |
Published: | 2025-01-08 |
DOI: | 10.32614/CRAN.package.tidyprompt |
Author: | Luka Koning [aut, cre, cph], Tjark Van de Merwe [aut, cph], Kennispunt Twente [fnd] |
Maintainer: | Luka Koning <l.koning at kennispunttwente.nl> |
BugReports: | https://github.com/tjarkvandemerwe/tidyprompt/issues |
License: | GPL (≥ 3) | file LICENSE |
URL: | https://github.com/tjarkvandemerwe/tidyprompt, https://tjarkvandemerwe.github.io/tidyprompt/ |
NeedsCompilation: | no |
Materials: | README NEWS |
CRAN checks: | tidyprompt results |
Reference manual: | tidyprompt.pdf |
Vignettes: |
Creating prompt wraps (source, R code) Getting started (source) Sentiment analysis in R with a LLM and 'tidyprompt' (source) |
Package source: | tidyprompt_0.0.1.tar.gz |
Windows binaries: | r-devel: not available, r-release: tidyprompt_0.0.1.zip, r-oldrel: not available |
macOS binaries: | r-release (arm64): not available, r-oldrel (arm64): not available, r-release (x86_64): tidyprompt_0.0.1.tgz, r-oldrel (x86_64): tidyprompt_0.0.1.tgz |
Please use the canonical form https://CRAN.R-project.org/package=tidyprompt to link to this page.