
Share
Microsoft updates its `promptbase` repository with refined MMLU prompt templates, enhancing code readability and adherence to best practices, making it easier for developers to work with large language models.
Microsoft's promptbase repository, a collection of tools and resources for working with large language models (LLMs), has recently seen an update to its Multi-Modal Language Understanding (MMLU) prompt templates. This change, committed by GitHub user riedgar-ms, focuses on improving code readability and maintainability through the application of best practices.
The primary technical change involves formatting the prompt_templates.py file using Black, a popular Python code formatter. This move is significant for several reasons:
For practitioners working with LLMs, especially those using promptbase for MMLU tasks, this update brings several benefits:
The prompt_templates.py file, which contains various template definitions for MMLU tasks, has been formatted to adhere to Black's style guidelines. Here are some key points:

Before formatting:
def generate_prompt(task_name, input_data):
prompt = f"Task: {task_name}\nInput: {input_data}\nOutput:"
return prompt
After formatting with Black:
def generate_prompt(task_name, input_data):
prompt = (
f"Task: {task_name}\n"
f"Input: {input_data}\n"
f"Output:"
)
return prompt
The prompt_templates.py file is part of the MMLU module in promptbase, which is designed to facilitate multi-modal language understanding tasks. These templates are crucial for generating prompts that can be used to test and evaluate LLMs across various domains.
The recent update to prompt_templates.py in Microsoft's promptbase repository is a step towards better code quality and maintainability. By adopting Black for code formatting, the project sets a good example for other developers working with LLMs and MMLU tasks. This change not only improves the readability of the code but also enhances collaboration and debugging processes.
Tags
Original Sources
About the author
Kai built ML infrastructure at a Bay Area startup before developing an obsession with transformer architectures and inference optimisation that eventually pulled him out of product work entirely. A stint at a compute research lab sharpened his instinct for what actually matters in a model release versus what is marketing. He writes from the inside — from the perspective of someone who has debugged the systems he is describing at three in the morning. He is allergic to hype and instinctively drawn to the unglamorous plumbing questions that everyone else skips over.
More from The Engineer →This Week's Edition
18 December 2023
133 articles
Related Articles
Related Articles
More Stories