The LaTeX Prompts That Actually Change the Document
The single property that decides whether an AI assistant edits your LaTeX or lectures you about it is whether your sentence is a question or an instruction. "How do I make this two columns?" has a correct answer in chat, so you get one. "Make this two columns" names an action on a file, so the file changes. Everything else, the politeness, the length, the word "please", makes almost no difference.
That is not a quirk of one product. It is what the words mean. Below are the asks that produce an edit, what each one triggers, and what the vaguer version gets you instead.
Prompts that produce a diff
What you want
Turn the numbers in the Results section into a booktabs table. Do not add a row that is not already in the prose.
Why this wording. Names the source of the data and forbids invention. The second sentence is the one that matters: without it, a model asked for a results table will happily fill in a plausible extra baseline.
What runs
- read_file
- propose_edit
- compile
What changes in the file
+ \usepackage{booktabs}+ \begin{table}[h]+ \begin{tabular}{lrr}+ \toprule+ Model & Accuracy & F1 \\
Ask it the vague way instead. Ask for "a nice table of the results" and you may get a fourth row that was never in your data.
The tool sequences are the ones Lexi emits for these asks. Nothing here is a mock-up of a workflow.
Three habits that do more than any wording
Name the boundary, not just the goal. Almost every bad outcome from an AI edit is something changing that you did not ask about. "Keep the section order", "do not touch the preamble", "leave the figures alone" cost you five words and remove most of that risk.
Let it read the file rather than pasting one. A pasted copy is stale the moment you keep typing, and the answer comes back as text you have to merge by hand. An assistant that can open the project reads what is there now and proposes a diff you accept or reject.
Make it compile before you believe it. LaTeX that looks right is not the same as LaTeX that builds, and the gap is usually a package that was never loaded. An assistant that ends its work with a real compile has checked something; one that ends with a confident paragraph has not.
What to do when it goes wrong anyway
Reject the diff and say what was wrong with it, in the same words you would use with a colleague: "that changed the figure numbering, put it back". The correction is cheap because the edit was proposed rather than applied. If you are working on something you cannot afford to have touched, keep the changes pending and read them before accepting, which is what the review step is for. For the errors themselves, the ten most common LaTeX errors covers what the log is telling you.
Frequently asked questions
Why does an AI assistant explain LaTeX instead of editing my file?
Because the prompt asked a question. "How do I make this two columns?" is answerable in chat, so it gets answered in chat. "Make this two columns" names an action on the document, and the assistant edits. The grammatical mood of the sentence decides which you get.
What makes a good prompt for a LaTeX assistant?
Name the file or region, name the outcome, and name what must not change. "Turn the numbers in Results into a booktabs table, do not add any row that is not already in the prose" gives an assistant everything it needs to act and a boundary it can be held to.
Should I paste my whole document into the prompt?
No, if the assistant can read your project. Pasting a copy means edits come back as text you have to merge by hand, and the copy goes stale the moment you type. An assistant with file access reads the current file and proposes a diff against it.
How do I stop an AI from inventing citations?
Ask it to look the reference up and to leave the key alone if it cannot find one. An assistant with a web lookup tool can fetch a real entry; without that instruction, a model asked for a citation will produce something plausibly shaped.
Ready to try LetX?
Join researchers and students focusing on their work, not the tools.
Get Started FreeWritten by Shihab Shahriar Antor , AI Engineer & Founder of Shahriar Labs. Builder of LetX (collaborative LaTeX) and QuantumSketch (AI STEM video).
