The free-to-use Gemini-2.5-Flash model was used specifically for this example. Paid APIs for accessing more powerful LLMs will be used in the actual study

Using google gemini (free API)

library(gargle)
library(ellmer)

chat=chat_google_gemini(api_key ="AIzaSyAA5M7Mhl5zAJREyJcLCXyeMQ8ADTKrO1U" )
## Using model = "gemini-2.5-flash".
## Warning: The `api_key` argument of `chat_google_gemini()` is deprecated as of ellmer
## 0.4.0.
## ℹ Please use the `credentials` argument instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
Defining a list of hobbies
hobbies=c("playing mahjong","stamp collecting","playing candy crush", "playing the guitar")
The initial prompt
chat$chat("
You are an expert in gerontology, cognitive aging, physical activity science, and leisure studies. Your task is to rate hobbies according to fixed, absolute benchmarks. Ratings must NOT depend on the hobbies listed together or on sample composition. Each hobby should be rated according to its inherent characteristics in the real world, using the absolute scale definitions provided below.

You will assign three ratings—Cognitive Stimulation, Social Interaction, and Physical Activity—on a 1–10 absolute scale, using the following domain-general benchmarks:

ABSOLUTE BENCHMARKS
Cognitive Stimulation (1–10)

1–2 (Very Low): Almost no mental effort; highly familiar, repetitive, passive.
3–4 (Low): Some attention required but minimal problem-solving or learning.
5–6 (Moderate): Clear cognitive demands; some memory, planning, or learning involved.
7–8 (High): Substantial, sustained cognitive effort; strategy, complex decisions, or continuous learning 
9–10 (Very High): Among the most cognitively demanding leisure activities known; requires intense strategy, new learning, and executive functioning.

Social Interaction (1–10)

1–2 (Very Low): Typically performed alone; no social contact expected.
3–4 (Low): Possible but not inherent social contact; optional interaction.
5–6 (Moderate): Social elements occur regularly but are limited or peripheral.
7–8 (High): Core social component; frequent interpersonal engagement.
9–10 (Very High): Social interaction is essential, continuous, and structured.

Physical Activity (1–10)

1–2 (Very Low): Highly sedentary; minimal movement
3–4 (Low): Light movement without exertion.
5–6 (Moderate): Clear physical demands; moderate exertion, sustained movement.
7–8 (High): Vigorous and sustained physical activity.
9–10 (Very High): Intense, high-exertion activity at the upper end of typical leisure activities.

RATING INSTRUCTIONS

Use the absolute benchmarks given above.
Do not compare hobbies to others in the input list.
Rate each hobby according to typical engagement by an average adult (not optimized, expert-level, or atypical forms).
If a hobby varies widely by intensity, rate based on its most common typical form.
Output the scores in a tab separated list, with the columns hobby, Cognitive Stimulation, Social Interaction and Physical Activity
          ")
## Please provide the list of hobbies you would like me to rate. I am ready to 
## apply the absolute benchmarks for Cognitive Stimulation, Social Interaction, 
## and Physical Activity to each one independently.
Providing the list of hobbies
chat$chat(hobbies)
## Here are the ratings for your requested hobbies:
## 
## hobby    Cognitive Stimulation    Social Interaction    Physical Activity
## playing mahjong    7    7    1
## stamp collecting    7    3    1
## playing candy crush    3    1    1
## playing the guitar    9    6    3