Skip to content
TheChatArchiveThe Chat Archive
oasst-pythia-12b· LAION (OpenAssistant models)Hugging Face Arena Human Preference 55K

How to write a factorial function in Python?

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with gpt-3.5-turbo-0314’s answer.
  1. User

    How to write a factorial function in Python?

  2. Assistant
    def factorial(n):
        if n == 0:
            return 1
        else:
            return n * factorial(n-1)
    

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.