Papers › Prompting with Pseudo-Code Instructions

Prompting with Pseudo-Code Instructions

19 May 2023arXiv:2305.11790archive 2025-07-28

Mayank Mishra, Prince Kumar, Riyaz Bhat, Rudra Murthy V, Danish Contractor, Srikanth Tamilselvam

Prompting with natural language instructions has recently emerged as a popular method of harnessing the capabilities of large language models. Given the inherent ambiguity present in natural language, it is intuitive to consider the possible advantages of prompting with less ambiguous prompt styles, such as the use of pseudo-code. In this paper we explore if prompting via pseudo-code instructions helps improve the performance of pre-trained language models. We manually create a dataset of pseudo-code prompts for 132 different tasks spanning classification, QA and generative language tasks, sourced from the Super-NaturalInstructions dataset. Using these prompts along with their counterparts in natural language, we study their performance on two LLM families - BLOOM and CodeGen. Our experiments show that using pseudo-code instructions leads to better results, with an average increase (absolute) of 7-16 points in F1 scores for classification tasks and an improvement (relative) of 12-38% in aggregate ROUGE-L scores across all tasks. We include detailed ablation studies which indicate that code comments, docstrings, and the structural clues encoded in pseudo-code all contribute towards the improvement in performance. To the best of our knowledge our work is the first to demonstrate how pseudo-code prompts can be helpful in improving the performance of pre-trained LMs.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2305.11790")

Code

Syntology Ran 0 of 13 code samples harvested from 1 repository linked to this paper; 13 have no recorded run.

By repository: official repository: 13 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

mayank31398/pseudo-code-instructions officialmentioned in papermentioned on GitHubApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 0 ran; 0 honoured the contract we drafted; 13 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

13unverified

Licence: 0 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from mayank31398/pseudo-code-instructions. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

english_to_gujarati mayank31398/pseudo-code-instructions/instructions/1079.py official repository unverified Apache-2.0 (permissive) · cea75406d359ed14 · report
load_tokenizer mayank31398/pseudo-code-instructions/code_instruct/model.py official repository unverified Apache-2.0 (permissive) · 35ab7eb005ae0a76 · report
pad mayank31398/pseudo-code-instructions/code_instruct/model.py official repository unverified Apache-2.0 (permissive) · df1b3e1970a39db7 · report
preprocess mayank31398/pseudo-code-instructions/instructions/1007.py official repository unverified Apache-2.0 (permissive) · b8d1dd9b82ebdfde · report
preprocess mayank31398/pseudo-code-instructions/instructions/1019.py official repository unverified Apache-2.0 (permissive) · ba93e42d23bea00f · report
preprocess mayank31398/pseudo-code-instructions/instructions/105.py official repository unverified Apache-2.0 (permissive) · 43f4d8361d5f4aee · report
preprocess mayank31398/pseudo-code-instructions/instructions/1061.py official repository unverified Apache-2.0 (permissive) · 54a724b27bcc9357 · report
sort mayank31398/pseudo-code-instructions/code_instruct/split_tasks.py official repository unverified Apache-2.0 (permissive) · d493bce6bf95b3e1 · report
story_sentence_generation mayank31398/pseudo-code-instructions/instructions/105.py official repository unverified Apache-2.0 (permissive) · 08da323c868e03b6 · report
translate_bengali_to_marathi mayank31398/pseudo-code-instructions/instructions/1061.py official repository unverified Apache-2.0 (permissive) · dfa75eb02881dee8 · report
translate_english_to_punjabi mayank31398/pseudo-code-instructions/instructions/1007.py official repository unverified Apache-2.0 (permissive) · 124a5b44b23a83b5 · report
translate_oriya_to_tamil mayank31398/pseudo-code-instructions/instructions/1073.py official repository unverified Apache-2.0 (permissive) · 71ac44a0094c857b · report
translate_oriya_to_telugu mayank31398/pseudo-code-instructions/instructions/1019.py official repository unverified Apache-2.0 (permissive) · aa32f3d974f6de21 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

BLOOMCodeGen

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections