AI for coding
Strategy
Measuring the real impact of context
Instead of assuming that extra files like AGENTS.md always help the AI, you should measure their impact on specific tasks. Studies have shown that adding extensive, generated context often even lowers the problem-solving success rate by a few percent.
Run A/B tests for your coding agent. Have it fix 5 bugs with an AGENTS.md file and 5 without it, then objectively compare in which case the success rate was higher.
Strategy
Focusing on surgical intervention (Surgical Intervention)
Context files should resolve only those ambiguities that the code and the agent's built-in tools cannot handle on their own. The report prescribes treating these files as a collection of "expensive truths," not universal documentation.Explanation or promptAnalyzing whether, while writing a very polite email for a user, the artificial intelligence secretly activates concepts such as "manipulation" or "deception".
Evaluating AGENTS.md: Are Repository-Level Context Files Helpful for Coding Agents?Strategy
Looking for the "workspace" (Global Workspace)
Isolating the fact that the AI has a special place in its virtual brain where it keeps temporary, important information needed to solve a problem, separating it from the ordinary assembling of sentences.
When you ask an AI to put together a trip plan, the system keeps information about the budget in its virtual "scratch pad" so it doesn't suddenly forget it halfway through writing the answer.
Strategy
Decomposition
A strategy of breaking complex engineering problems into smaller, sequential subtasks. It helps models handle software architecture without losing context and logic.
"Instead of asking for the whole application to be written, ask first for the database structure, in the next step for the API, and finally for the user interface."
Strategy
Thought Generation
Forcing the model to analyze and describe the business logic before it generates the final code or bug fix. This significantly improves effectiveness on tasks that require intensive reasoning.
"Before you write the code for this algorithm in Python, describe step by step how you intend to optimize its memory complexity."
Strategy
Self-Criticism
Making the model analyze its own initially generated solution, find errors in it and propose an improved, final version before presenting it to the user.
"Write a login function. Then act as an auditor, analyze this code for security vulnerabilities, fix them and return the final, secure code."
Strategy
Ensembling (combining answers)
Having the AI generate several different approaches to solving one problem and choosing the most optimal one, e.g. in terms of performance or code cleanliness.
"Generate three completely different approaches to fixing this authorization bug, and then point out the solution that is the most optimal."
Good practice
Matching the technique to the specific task
The report indicates that for tasks requiring complex logic (e.g. bug hunting) "Thought Generation" works best, whereas for template-based tasks (e.g. code formatting, writing tests) example-based "Few-Shot" techniques give much better results.
"To generate repeatable unit tests, paste 3 examples of your coding style (Few-Shot). To look for a security vulnerability, use the prompt 'Let's analyze this file step by step'."
Good practice
Awareness of time and token costs
Always keep resources in mind. Complicated techniques such as Ensembling or Self-Criticism significantly increase token usage and waiting time for a response, so they should not be used for trivial tasks.
"To generate a simple comment documenting code, use basic Zero-Shot to save tokens, instead of applying advanced reasoning chains."
Good practice
Optimizing the linguistic features of the prompt
The authors note a strong correlation between the precision of the language used and the quality of the generated code. Specific technical vocabulary helps steer the model toward the right solution.
"Instead of writing 'Write something that fetches data from a page', use: 'Write an asynchronous Python function using aiohttp that fetches data from the given REST API endpoint'."
Avoid
Using one complicated template for everything (One-size-fits-all)
Not every prompt engineering technique works equally well on every programming task. Imposing heavy reasoning techniques on simple problems only lowers efficiency and lengthens working time.
"Forcing long 'step by step thinking' when asking to rename a variable in a single line of code is a waste of resources and computing time."
Avoid
Demanding the solution to a huge system all at once
Overly large and complex software engineering requests sent in a single prompt (without using decomposition) drastically increase the risk of "hallucinations" and of generating code that does not work.
"Build a full e-commerce system with authorization, a cart, payment integration and an admin panel in one response."
Avoid
Ignoring the context around the code
Using Zero-Shot mode (without giving examples or broader context) when editing complicated software projects leads to code that does not integrate with the rest of the related application.
"The request 'Fix the bug in user_service.py' without providing the database models, error logs and related file dependencies."
Strategy
Reporting Elements Categorization (Reporting Elements Categorization)
Separating information about prompts in studies into essential, desirable and exceptional, which lets developers and researchers match the level of detail in their documentation to commonly expected standards.
Including the full prompt text and the exact model name in the documentation as "essential" information, and the possible history of trial and error from optimizing the query as "desirable" information.
Strategy
Disclosing full version data (Version Disclosure)
Clearly stating the exact model versions, access dates and parameter settings, which is crucial for other engineers being able to repeat (reproduce) the tests.
"we used the GPT-4 model", we report: "Model: GPT-4-0613, Temperature: 0.2, Top-p: 0.9, test date: October 15, 2025".
Strategy
Prompt Justification (Prompt Justification)
A requirement to describe explicitly why a given prompt has the structure it has, and which specific methods or keywords were deliberately used in it.
"The zero-shot chain-of-thought technique ('Think step by step') was used because earlier tests showed that without it the model gets lost when analyzing complex Java code."
Good practice
Systematic Documentation of prompt engineering (Systematic Documentation)
Maintaining a detailed, publicly available research repository (e.g. on GitHub) containing the final prompts, configuration files and the collected outputs of the artificial intelligence.
Making available a README.md file in a public research repository that links to all 150 prompts used in the experiment, together with the scripts that automated sending them.
Good practice
Explicit reporting of threats to validity (Threats to Validity Reporting)
Treating the instability of generated answers and the phenomenon of LLM "hallucinations" as built-in flaws of the research, and describing in the documentation, as a requirement, how the researchers controlled this risk.
Adding a point to the documentation: "Because the model could have made up API calls in the generated code, every generated snippet underwent a rigorous automated test compilation in a safe environment before the result went into the final statistics of the study."
Good practice
Optimization Transparency (Optimization Transparency)
Describing accurately and transparently in papers the process of improving queries: whether it was done manually by trial and error, or whether other, automated frameworks were used for it.
"The initial prompt was written manually by the researcher and then optimized iteratively with the DSPy tool, which ultimately increased the correctness of the studied code syntax by 24%."
Avoid
Omission of Prompt Context (Omission of Prompt Context)
Avoid presenting in studies only fragmentary descriptions of queries without the full context or the underlying system instruction, which makes it completely impossible for others to repeat your tests and assess their reliability.
"We asked ChatGPT to generate unit tests." instead of presenting in an appendix the precise step-by-step instruction that was used in the API.
Avoid
Ignoring Model Drift (Ignoring Model Drift)
Avoid assuming in publications that models offered from the cloud, and their hidden updates, will always work equally well on the same prompt. It is essential to record the specific date the tests were run.
Avoid publishing results suggesting that a prompt's effectiveness on a public API is "always 90%" without giving the exact date. After a silent update on the provider's servers, the same prompt may soon work completely differently.
Avoid
Omitting negative results in experiments (Hiding Failed Prompts)
Don't hide the lines of reasoning and prompt variants that simply didn't work after testing on code. Documenting failed queries is just as valuable to the community as the final engineering successes.
Presenting in a scientific publication only one "perfect" query, suggesting that the engineer came up with it on the first try, while the team quietly discarded 20 failed variants, which would also be worth writing about to warn others.
Strategy
Testing AI over long distances (Round-trip Relay Simulations)
Instead of evaluating a model on one simple task, the authors tested it in a long, multi-step process. Each subsequent task built on the previous results, which made it possible to detect that over time the AI loses and distorts information.
Ask the AI to add data to a table, then in the next message to convert currencies, and finally to remove duplicates. After each of these steps, check to make sure the AI hasn't silently deleted other important columns.
Strategy
Adding "decoys" to tasks (Distractor Environment Setup)
The researchers deliberately added irrelevant but topically similar files to the AI's working environment. The goal was to check whether the model can focus only on the document being edited and not mix up data.
You send the model a new set of rules to fix grammar errors, but as an attachment you also include the old, outdated rules from years ago, to see whether the AI accidentally pastes old provisions from it.
Strategy
Tracking invisible errors (Silent Corruption Tracking)
Models can ruin a file in such a way that at first glance it looks correct, but important pieces of data are missing from it. So special systems were used for constant, line-by-line comparison of file versions.
Using a program for automatic text comparison (a so-called "find the differences" tool) right after the AI hands over the finished file, to catch vanishing words or whole sentences.
Good practice
Short tasks instead of long marathons (Short-horizon Workflows)
Avoid forcing the AI to work continuously on one document in very long conversations. AI errors pile up, and with each further interaction the file gets more and more corrupted.
Instead of writing a whole multi-page report with the AI in one chat window, start a new, clean conversation for each subsequent chapter of the report.
Good practice
A human has to check it (Human Review Validation)
Never trust the results of artificial intelligence's work without limits. Because errors often hide behind a document that looks correct, every change made by the AI needs to be verified.
Paste the text returned by the artificial intelligence into Word or Google Docs with "Track Changes" turned on, so you can manually approve every fragment the model added or removed.
Good practice
Give the AI only what is necessary (Context Size Management)
Don't send the AI whole huge files if it only has to fix one fragment. The more unnecessary text you give the model, the greater the likelihood that it will start losing data.
If you want the model to fix a typo on page 50 of your document, copy and send it only that one short paragraph to fix, instead of uploading the entire hundred-page file.
Avoid
Leaving the AI on its own for a long time (Blind Delegation of Long Workflows)
Don't entrust big editing tasks to artificial intelligence without supervision. Trusting the AI to carry out a long process on files by itself results in leading models irreversibly spoiling as much as 25% of the content.
Sending the instruction: "Translate and format my book", then going out for coffee, assuming that the file you get back when you return will be 100% consistent with the original.
Avoid
Trusting that the AI will check its own mistakes (Over-reliance on Agentic Tools)
Don't think that because the model has access to a calculator or external tools, it will correct its own errors. Research showed that models using these tools does not reduce the number of silent errors in files.
Asking the AI to calculate a budget and reassuring yourself with the thought: "It surely didn't make a mistake, because the model itself wrote that it checked it with a calculator."
Avoid
Judging a book by its cover (Surface-level Trust)
The fact that a file prepared by artificial intelligence opens correctly, looks nice and shows no technical errors does not mean that everything inside the file adds up.
Glancing at a table generated by the model, admiring the nice even columns and sending it straight to the client, without making sure the AI hasn't cut off the last week of data in it.
Done!
You went through 31 takeaways.
Keep reading
Towards Provably Unbiased LLM Judges via Bias-Bounded EvaluationIs your prompt a single sentence? Break it into sections.
Prompt Engineering and the Effectiveness of Large Language Models in Enhancing Human ProductivityHow many eyes does the sun have? AI knows it's nonsense. You have to draw it out.
Won't Get Fooled Again: Answering Questions with False Premises









