custom_ensemble: Define a custom LLM ensemble

View source: R/ensemble.R

custom_ensembleR Documentation

Define a custom LLM ensemble

Description

Lets the user swap in a different set of Ollama-served models, adjust the number of replicates per model, or change the aggregation rule. The paper's findings support 3-4 comparable open-source LLMs with the mean aggregator; other choices are supported but not recommended.

Usage

custom_ensemble(
  models,
  replicates = .DEFAULT_REPLICATES,
  aggregator = c("mean", "median", "max", "topk_mean"),
  temperature = .DEFAULT_TEMPERATURE,
  backend = backend_ollama()
)

Arguments

models

Character vector of Ollama model tags (or backend-appropriate identifiers).

replicates

Integer >= 1. Number of replicates per model.

aggregator

One of "mean", "median", "max", "topk_mean".

temperature

Sampling temperature passed to the backend.

backend

A backend object (default: backend_ollama()).

Value

A screenllm_ensemble object.


screenllm documentation built on Sept. 24, 2026, 5:11 p.m.