GitHub

Lifecycle: experimental

This package is highly experimental; expect its interface to change rapidly.

commons helps data scientists build trustworthy data agents. It provides a meta-harness; you bring your data and understanding of how to do calculations on it, and the package situates that in a set of prompts and tools that make for a more accurate, fast, and cost-effective agent than a regular coding agent provided with the same information.

commons agents use a pool of trusted calculations drawn from your existing work, like Shiny apps and Quarto docs, to answer questions. (You can also import existing trusted calculations from semantic layers in Snowflake and Databricks.) When the question can’t be answered by a trusted calculation, the agent can search across context you’ve compiled to query data directly, and the response will be deterministically tagged as untrusted.

A screencast demonstrating a commons data agent answering questions with a trusted calculation and then a direct data query. In the first case, there's a provenance pill that marks the answer as verified. In the second case, the pill reads 'Untrusted.'

commons agents support a wide variety of LLM providers via ellmer. Extracted context is stored in plain-text data-dict.yaml and .R files.

Installation

To install the package, run:

# install.packages("pak")
pak::pak("posit-dev/commons")

To learn more, see vignette("commons", package = "commons").

Read the original on github.com ↗