def prompt(usage: str, order: str, aspect: str, context: list[str], question: str) -> str:
    """Generate the language model prompt based on the given parameters.

    Parameters
    ----------
    usage : str
        The inference task intended by the prompt: `general` or `premise`. The
        `general` usage expects a story sentence (or somthing similar in style)
        to be used as `question`; the `premise` usage expects a inferred result
        (or something similar in style) to be used as `question`.
    order : str
        The inference direction intended by the prompt: `forward` or `backward`.
        The `forward` direction will deduce additional information based on the
        `question`; the `backward` direction will hypothesis additional
        information based on the `question`.
    aspect : str
        The inference aspect intended by the prompt: `causal`, `emotional`,
        `spatial`, `possession`, or `miscellaneous`. These aspects corresponds
        to the dimensions outlined in the GLUCOSE Dataset.
    context : list[str]
        The story context that the inference is based upon.
    question : str
        The question that the inference intends to answer.

    Returns
    -------
    str
        A prompt for the language model.
    """
    return (f"glucose: {usage} {order} {aspect} "
            f"context: {' '.join(map(str.strip, context))} "
            f"premise: {question.strip()}")