▲ 6 r/rstats
foundryR: tibble workflows for Azure AI Foundry from R
I have been working on foundryR, a development-version R package for using Microsoft Azure AI Foundry from dataframe-oriented workflows.
The main design choice is "dataframe in, dataframe out." The package returns tibbles for things that are otherwise awkward to keep inside R pipelines:
- Azure AI Content Safety: moderation, groundedness, prompt-shield checks, protected material, blocklists
- strict structured extraction using JSON Schema
- embeddings and pairwise similarity
- Batch and Files API workflows
- Responses API calls, tools, stored agents, usage fields, and raw response capture
- codebooks, agreement, consistency, and provenance helpers for annotation work
The docs are here:
GitHub:
https://github.com/farach/foundryR
Install:
install.packages("pak")
pak::pak("farach/foundryR")
A small example of the package shape:
foundry_moderate("Thanks so much for your help, this was a great session.")
#> # A tibble: 4 x 6
#> text category severity label blocklist_matches raw_response
It is not on CRAN yet, and some helpers wrap preview APIs. I would be grateful for feedback from people who use R with Azure AI Foundry: where is setup confusing, what output shapes are missing, and what should be documented before a broader release?
u/farach — 18 hours ago