Learn R Programming

chatRater (version 1.1.0)

chatRater-package: Multi-Model LLM API Wrapper and Cognitive Experiment Utilities

Description

This package provides functions to interact with multiple LLM APIs (e.g., 'OpenAI', 'DeepSeek', 'Anthropic', 'Cohere', 'Google PaLM', 'Ollama').

Additionally, several functions are provided that encapsulate LLM prompts to obtain various psycholinguistic metrics:

  • Word Frequency: Number of occurrences (often log-transformed) of a word in a corpus.

  • Lexical Coverage: Proportion of words in the stimulus that are found in a target vocabulary.

  • Zipf Metric: The slope of the log-log frequency vs. rank distribution, per Zipf's law.

  • Levenshtein Distance (D): Minimum number of single-character edits required to transform one stimulus into another.

  • Semantic Transparency: The degree to which the meaning of a compound or phrase is inferable from its parts.

Arguments

Details

The LLM API functions allow users to generate ratings using various large language models. The cognitive experiment functions.