Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-2.0· AnthropicHugging Face Arena Human Preference 55K

Untitled conversation

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Claudeclaude-instant-1’s answer.
  1. User
    [species-button [\N species-id]] {
            .[blob  [
                            .[shape circular]
                            .[colorref [get-species-color [#species-id]]]
                    ]]
            .[tref  [get-species-name [#species-id]]]
    }
    [view whats-here] {
            .[h1    [
                            .[t [whats-here]]
                    ]]
            .[list  [species-seen-here]     [species-button]]
    }
    

    The above code is written in a language called IGEL. Variables are referenced using [#variable-name] in IGEL. get-species-color, species-seen-here, get-species-name and str whats-here are functions provided by the app runtime. Given the above example, please try to guess how macros are invoked in IGEL. Then, describe the syntax of the IGEL language, starting with a description of how functions are defined.

  2. Claude Assistant

    Based on the code example, it looks like macros in IGEL are invoked using square brackets around the macro name.

    Here is how I understand the syntax of IGEL based on the example:

    • Functions are defined using the syntax [function-name] { function-body }. The function body contains IGEL code that will be executed when the function is called.

    • Macros are invoked using [macro-name] and take parameters in square brackets after the macro name.

    • Variables are referenced using #[variable-name] syntax.

    • IGEL code is made up of elements with a . followed by a list of attributes in square brackets:

    .[element-name [attribute-1 value-1] [attribute-2 value-2]]
    
    • Lists are created using square brackets around a series of elements:
    .[list [element-1] [element-2] [element-3]]
    
    • The view macro defines a view/screen, with the view name in square brackets. The view body contains IGEL code to define the UI elements.

    • The species-button macro seems to define a reusable button for each species. It takes a species ID parameter and uses the runtime functions to customize the button for that species.

    Please let me know if I have misunderstood anything about the IGEL syntax based on this example! I'm happy to clarify or expand my explanation.

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