Beyond the periodic table

Use R to examine a language-model system. Learn about evaluation, workflows, LangChain, LangGraph and LangSmith.

The table lists separate text tasks. A system can join several tasks. For example, it can find a document, write an answer, and update a record. You must examine the whole system as well as each task.

This section starts with one worked lesson: Compare two system versions in R. You will examine invented test results. You will not call a model. You do not need an account, an API key, or Python for this lesson.

Start with the right question

An evaluation shows whether a system meets a stated requirement. A higher average score is not enough. A system can answer more questions correctly and still skip a required check before it changes a record.

The worked lesson asks you to decide whether to release version B. Release means permission for users to use a version. You will compare version B with version A on the same cases. You will keep missing results in the total. You will also examine the rule used to grade each result.

What to read first

You need basic R. You should know data frames and the pipe, |>. You will run the supplied code and read its results. The lesson explains the evaluation terms when you need them. These pages give more detail:

This lesson only reads local files and computes results in R. Other lessons on this site can execute local models at fixed revisions.

Where the tools fit

The project examined the tool descriptions below on 21 October 2026. They describe documented features. The worked lesson does not run these tools or examine a connection between them.

LangChain gives developers model and tool interfaces. It also supports agent loops. An agent loop lets a model choose a tool, read its result, and choose a next step. Its official framework examples use Python or JavaScript/TypeScript.

LangGraph controls a workflow through explicit state and steps. State is the information kept between steps. A graph names the steps and the routes between them. It can support loops, pause for a person, and resume later. It does not require LangChain. The examined documentation does not list an official R version of LangGraph.

LangSmith is a separate platform for traces, datasets, and evaluations. A trace records the steps during a run. An SDK is a set of code tools for a service. The examined SDK list includes Python, JavaScript/TypeScript, Go, and Java. It does not list R.

The absence of an R SDK does not prove that R cannot use the platform’s APIs. An API is an interface through which software exchanges requests and data. An R connection through web requests or another runtime needs a separate test. This lesson does not examine such a connection.

R also has native tools. The ellmer package provides model calls, tool calls, and outputs with named fields. The vitals package organizes evaluation cases, solvers, scorers, and logs. A solver produces a result. A scorer assigns a score. These tools do not prove that R can save and resume workflows like LangGraph.

WarningA local score can still need a network call

In vitals, generate() makes model requests, and $eval() solves and scores. A scorer written in R does not make the solver network-free. The documented default uses the same model to solve and grade. You can change this setting. A separate judge model also needs independent checks by people.

Choose a workflow only when you need it

A fixed sequence, such as extraction, checks, and reporting, can be one R function. Use that simple form when it meets the need.

A different process may pause for a person, keep its state, and resume later. A graph runtime can help with that process. Before you claim that the runtime recovers after a crash, do a real restart test. A diagram, saved chat messages, or a checkpoint kept only in memory cannot prove that behavior.

An optional later lesson can compare these designs. This section does not yet provide a Python lab or an R-to-LangSmith connection.

Sources