Human-written demonstration (OpenAssistant volunteers)· OpenAssistant (human-written)
OpenAssistant Conversations (oasst2)
Write me POSIX-shellscript to convert Celsius to Kelvin.
In OpenAssistant data, “assistant” turns were written by human volunteers as demonstrations. They are not model outputs.
- User
Write me POSIX-shellscript to convert Celsius to Kelvin.
- Assistant
The following POSIX shell script can be used to convert Celsius to Kelvin. It uses the
bcprogram to perform the actual computation.sh#!/bin/sh # Check if an argument has been passed to the script if [ $# -eq 0 ]; then echo "Usage: $0 <celsius_temperature>" exit 1 fi # Read the celsius value from the first argument given to the script temp_c=$1 # Convert Celsius to Kelvin utilizing the "basic calculator" temp_k=$(echo "$temp_c + 273.15" | bc) # Print the result to stdout echo "$temp_c °C = $temp_k K"If the script is saved as a file named
convert.sh, 23°C could be converted to Kelvin by typingsh convert.sh 23
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)