TL;DR: Anki's text import is documented, so prompt against the documentation instead of guessing. Declare #separator:, #html: and #notetype: as header lines, quote any field containing your separator, and use the {{c1::...}} syntax for cloze. The 28 prompts below produce that file, with card-quality rules built into every template.
Almost every AI flashcard generator fails in one of two ways. The file will not import, or it imports perfectly and hands you two hundred cards not worth reviewing. You notice the first in ten seconds and the second in three weeks, after spaced repetition has made all of them permanent.
This page fixes both. The format half is verified against Anki's own manual rather than the CSV conventions most generators improvise. The quality half is built into the prompts, because a model asked for "flashcards from this chapter" will happily produce cards with two facts in one, cues that give the answer away, and questions nobody could answer without the paragraph they came from.
We generate the prompt here, not the deck. Nothing on this page needs an account, and everything works in ChatGPT, Claude or Gemini as it stands.
What Does "Anki-Ready" Output Actually Require?
A plain text file, UTF-8, with a documented header block on top. Anki's manual: "Any plain text file that contains fields separated by commas, semicolons or tabs can be imported into Anki, provided some conditions are met", and "Anki tries to guess which field separator (commas, tabs, etc.) your file uses." Guessing is what to remove, and since Anki 2.1.54 you can: "Anki 2.1.54+ supports certain headers that can be included in the text file to make importing more powerful or convenient. They consist of #key:value pairs and must be listed in separate lines at the top of the file."
The documented keys:
| Header key | Allowed values | What it does |
|---|---|---|
separator | Comma, Semicolon, Tab, Space, Pipe, Colon, or the literal character | Sets the field separator |
html | true, false | Whether the file is treated as HTML |
tags | tags separated by spaces | Adds those tags to every note in the file |
columns | names, separated by the separator you already set | Names the columns in the import screen |
notetype | note type name or id | Presets the note type, if it exists |
deck | deck name or id | Presets the deck, if it exists |
notetype column | 1, 2, 3, … | Which column holds each row's note type |
deck column | 1, 2, 3, … | Which column holds each row's deck |
tags column | 1, 2, 3, … | Which column holds each row's tags |
guid column | 1, 2, 3, … | Which column holds each note's GUID |
Two consequences. #separator: must come before #columns:, since column names are split on the separator you just set. And #tags: tags the whole file, so per-card tags need #tags column:.
This is the block every template below tells the model to emit:
FILE FORMAT (non-negotiable):
Output a single plain-text block, nothing before or after it.
Line 1: #separator:semicolon
Line 2: #html:false
Line 3: #notetype:Basic
Line 4: #deck:[DECK NAME]
Line 5: #columns:Front;Back;Tags
Then one row per note, semicolon-separated, exactly 3 fields per row.
If a field contains a semicolon, a double quote or a line break, wrap the whole
field in double quotes and double any internal double quote.
Tags are space-separated inside the Tags field; use :: for hierarchy.
No blank lines. No markdown. No commentary.
Why Do AI-Generated Decks Fail on Import?
Four reasons, all of them format rather than content, and all four documented.
A field ate the separator. The manual: "Anki determines the number of fields in the file by looking at the first (non-commented) line." Later rows with more fields lose the surplus, and "the extra content will not be imported." One unescaped comma in an answer silently truncates that card.
A field contains a line break. Anki documents the fix: "There are two ways to include newlines or the field separator in fields." Either "Escape the characters by placing the contents of the field in quotation marks", or use HTML line breaks. If you need a literal quote inside a quoted field, "you need to replace a single doublequote with two doublequotes".
HTML was left on when the content contains angle brackets. With HTML enabled, the manual gives the replacements: < becomes <, > becomes >, & becomes &. A generics-heavy programming deck imported with HTML on will lose half of every code answer.
Cloze plus quoted multi-line, which is the trap. Straight from the manual: "Escaped multi-lines will not work correctly if you are using cloze deletions that span multiple lines. In this case, use HTML newlines instead." And those need the flag: "You need to turn on the Allow HTML in fields in the import dialog for HTML newlines to work", or the equivalent #html:true header.
So the HTML flag is a real decision, not a default:
| Your content | Set | What it costs you |
|---|---|---|
| Prose with commas and semicolons | #html:false | Quote those fields; no line breaks inside a field |
| Multi-line answers | #html:true, use <br> | You must escape <, > and & everywhere |
| Cloze spanning several lines | #html:true, use <br> | Quoted multi-line will not work here |
Code, chemistry, maths, anything with < or & | #html:false | No HTML line breaks available |
The same discipline applies to any structured output, covered generally in how to prompt for tables and structured data.
What Makes a Card Worth Drilling?
Anki's manual points to one source on this, and it is worth following. In its cloze deletion section it sends you to "Rule 5" of Piotr Wozniak's Effective learning: Twenty rules of formulating knowledge, published on super-memory.com. Rule 4 there is the minimum information principle: "The material you learn must be formulated in as simple way as it is only possible." Rule 12, on interference, opens its advice with "make items as unambiguous as possible". Rule 19 covers sourcing, and adds a design note most decks ignore: "Sources should accompany your items but should not be part of the learned knowledge".
Translated into constraints a model can follow, that is five rules. A card tests one fact. Its cue is unambiguous, meaning exactly one answer fits. It is answerable in isolation, without the paragraph it came from. It demands recall, not recognition. And its source travels with it in a field you do not review, which is the difference between a deck you can audit later and one you have to rebuild.
Paste this block above any template below. It is the most valuable thing on the page:
CARD QUALITY RULES (apply to every card, without exception):
1. ONE fact per card. If a card contains "and", "or" a comma list, split it.
2. The question must have exactly one correct answer. If two answers fit, the
question is too vague — rewrite it, do not add a hint.
3. The question must be answerable without seeing the source paragraph. Put the
needed context INSIDE the question, in as few words as possible.
4. Never put the answer, or a distinctive word from it, in the question.
5. Never write a yes/no or true/false question.
6. Never ask "list all X" or "what are the characteristics of X". Split those
into separate cards, one per member, each with a distinguishing cue.
7. Answers are as short as the fact allows: a term, a number with units, a
phrase. Never a paragraph.
8. If the source does not clearly state something, do NOT make a card for it.
List it at the end under SKIPPED, with the reason.
Rule 8 is the one to keep. A model told to produce forty cards from a thirty-fact chapter will invent ten. A model given permission to report a shortfall will report it.
The Templates, By Card Type
Every template assumes the format block and the quality rules are already in the prompt. They are organised by card type because the prompt genuinely differs: a good cloze is not built like a good vocabulary card.
Basic front and back, from a source
The safe default: everything comes out of text you paste, nothing out of the model.
Read the source below and write Anki notes in the file format above.
Note type: Basic. Fields: Front (question), Back (answer), Tags.
Use ONLY facts stated in the source. Do not add outside knowledge.
Target [N] cards. If the source supports fewer, produce fewer and say so.
Tag every card: [topic] source::[document-name]
SOURCE:
[paste your chapter, notes, transcript or article here]
Basic front and back, from your own messy notes
Lecture notes are compressed. This asks for the decompression first, so you see what the model thought your shorthand meant before it becomes a card.
Below are my raw notes. Before writing any card:
1. Rewrite each line as a complete sentence, expanding my abbreviations.
2. Mark with [UNCLEAR] any line you cannot expand with confidence.
Show me that list first. Then write Basic notes from the clear lines only,
in the file format above. Do not make cards from [UNCLEAR] lines.
NOTES:
[paste]
Reversed cards
Anki's built-in "Basic (and reversed card)" note type creates two cards per note, in both directions. The header line is easy; the selection is the hard part.
Note type for this file: Basic (and reversed card)
Header line: #notetype:Basic (and reversed card)
Only create a note here if BOTH directions are answerable:
- given Front, the Back is the single correct answer, AND
- given Back, the Front is the single correct answer.
If the reverse direction has multiple valid answers, do not use this note
type for it — output that fact as a plain Basic note instead, in a second
block with its own headers.
Reversed only where it earns its place
For material you know to be asymmetric, like symptoms and a diagnosis.
For each item, decide the direction I should study and say why in one clause.
Directions: FORWARD only, BOTH, or REVERSE only.
Rule: a direction is only valid when the answer is unique.
Output three blocks, each with its own header lines: one #notetype:Basic file
for FORWARD, one #notetype:Basic (and reversed card) file for BOTH, and one
#notetype:Basic file with the fields swapped for REVERSE only.
Cloze deletion, one deletion per card
Anki's cloze syntax is a numbered marker in double curly braces; the manual's own example is Canberra was founded in {{c1::1913}}. The rule that matters for prompting is on the card generation page: "For each separate number, a card will be generated."
Note type: Cloze. Fields: Text, Extra, Tags.
Header lines: #notetype:Cloze and #columns:Text;Extra;Tags
In the Text field, hide the single most important term using this exact
syntax, with double curly braces: {{c1::hidden text}}
One cloze number per note. Do not use c2 or higher in this file.
The sentence around the deletion must still identify what is being asked
if the hidden part were removed. If it does not, rewrite the sentence.
Never delete a whole clause. Delete a term, a number, or a name.
Extra field: the source reference only. Never the answer.
Cloze with several deletions on one note
Reusing a number hides several sections on the same card. Different numbers make different cards from one sentence.
Use numbered cloze markers to control card count:
- SAME number on two sections = one card hiding both.
- DIFFERENT numbers = one card per number, from the same sentence.
For each sentence, choose deliberately and state your choice in the Extra
field, in this form: "c1,c2 separate: independently recallable".
Use different numbers only when each hidden part is recallable on its own
from the rest of the sentence. Otherwise use the same number.
Maximum 3 distinct numbers per note.
Cloze with a hint
Anki lets you add a hint by adding a second pair of colons inside the marker. The manual's example renders {{c1::Canberra::city}} as "[city] was founded in 1913."
Add a hint ONLY where the sentence alone leaves the answer genuinely
ambiguous. Syntax: {{c1::answer::hint}}
The hint names the CATEGORY of the answer, never a property of the answer
itself. Good: ::enzyme, ::year, ::country. Bad: ::starts with P,
::the one we discussed, ::rhymes with cat.
If you find yourself needing a hint on more than a third of the cards, the
sentences are too short. Rewrite them with more context instead.
Definition cards
The direction matters more than people expect: the cue has to be what you meet in the wild.
For each term in the source, write TWO Basic notes:
A. Front: "[term] — define." Back: the definition, under 15 words.
B. Front: a definition rewritten so it contains none of the term's own
words. Back: the term.
Card B is the one that matters — it must not contain the term, any part of
the term, or a word sharing a root with it. Check each one before output.
Skip any term whose definition in the source is longer than one sentence,
and list it under SKIPPED for me to split by hand.
Definition pairs that get confused
Wozniak's interference rule is a real failure mode: two things you learned separately become impossible to tell apart once both are in the deck.
Scan the source for pairs of terms that are easy to confuse: similar
spellings, similar meanings, or the same category.
For each pair, do not write two independent definition cards. Write:
1. One card per term whose question contains the DISTINGUISHING feature
only, phrased so the other term of the pair is clearly wrong.
2. One discrimination card: "What distinguishes [A] from [B]?" with a
one-line answer naming the single axis they differ on.
Tag all of them: confusable::[pair-name]
Vocabulary with an example sentence
Four fields, one of which never gets tested. The example is context, not content.
Note type: Basic. Fields: Front;Back;Tags
Front: the target word alone.
Back: "[translation or meaning] — [example sentence in the target language]"
The example sentence must contain the target word, be under 12 words, and be
one you would plausibly hear or read. Do not translate the example.
One sense per card. If a word has three senses, write three cards, each with
a Front that disambiguates: "[word] (in a [domain] context)".
Vocabulary, production direction
Recognition and production are different skills, and most auto-generated language decks only ever build the easy one.
Build the PRODUCTION direction: Front is my language, Back is the target
language. Because several target words may fit one English prompt, each
Front must include a disambiguating constraint in brackets, e.g.
"to run [of a machine, not a person]" or "bank [river, not money]".
Reject any card where the constraint does not narrow it to exactly one word.
Formulas and equations
Split the formula from the conditions under which it applies. Both are testable; together they are one card doing two jobs.
For each formula in the source, write these notes and no others:
1. Front: "[Name of law/formula] — state it." Back: the formula in plain
text, one line, no LaTeX and no markdown.
2. One card per symbol: Front: "In [formula], what does [symbol] represent,
and in what units?" Back: the meaning and the units.
3. Front: "When does [formula] apply, and when does it not?" Back: the
condition, in under 12 words.
Do not write a card asking me to derive anything.
Formulas as cloze
Cloze suits formulas well, as long as you hide one component at a time.
Note type: Cloze. Write each formula as a sentence containing the formula
in plain text, then hide ONE component per note:
"Ohm's law states that V = {{c1::I × R}}."
Never hide the whole right-hand side and the units in the same deletion.
Never hide more than one symbol per cloze number.
Write the formula with the multiplication sign spelled out as × or *, never
as an implicit space, so the cloze boundary is unambiguous.
Diagrams, honestly
Anki's manual is clear about what image occlusion is: a built-in note type where you load an image and then "Click on the icons on the left to add as many areas to your image as you want", choosing rectangles, ellipses or polygons. Those masks are drawn in Anki's own editor, so a text model cannot generate image occlusion notes. What it can do is prepare the material around the image:
I am going to occlude a diagram in Anki myself. From the description below,
produce:
1. A numbered label list, ordered the way I should mask them.
2. A one-line Header text for the note, which will show above the image.
3. Basic notes (in the file format above) for the facts a masked label
cannot test: function, relationship, and what fails if it fails.
Do not attempt to produce image occlusion data. Do not invent labels the
description does not mention.
DIAGRAM DESCRIPTION:
[paste]
Cards that reference an image or sound file
Anki documents this path: copy media into the collection.media folder, reference it from a field, and enable HTML on import.
Some answers reference media I have already copied into collection.media.
For those rows, put the reference in the field as literal HTML:
image: <img src="FILENAME.jpg">
audio: [sound:FILENAME.mp3]
Because of this, set the header line #html:true for this file, and escape
every other literal <, > and & in the content as < > and &.
Use only the filenames I list below. Never invent a filename.
FILENAMES:
[paste]
Lists into atomic cards
Wozniak's rules 9 and 10 warn against sets and enumerations. This is the prompt that dissolves them.
The source contains lists. Do NOT write any card that asks me to recall a
whole list. For each list, instead produce:
1. One card per member: a cue that identifies that member uniquely, with the
member as the answer.
2. One count card: "How many [things] are there in [category]?"
3. One card for the organising principle, if the source states one.
Never write "Name the four types of X". If a list has no distinguishing cue
per member, say so and skip it rather than inventing one.
Ordered sequences
Where order genuinely is the content, chain the steps instead of listing them.
For ordered material (a process, a timeline, a pathway), write chain cards:
Front: "In [process], what comes immediately after [step N]?"
Back: step N+1, named only, no explanation.
Plus one card for the first step: "What is the first step of [process]?"
Plus one card for the count of steps.
Do not write a card that asks for the full sequence.
Exam-question style
Useful when the exam format itself is what you are training for, and easy to get wrong.
Write cards in the style of [exam name] stems, as Basic notes.
Front: a clinical or applied vignette of 25-40 words ending in a direct
question. Include only findings the source states.
Back: the single best answer, plus one short line beginning "Because:" giving
the discriminating feature.
NO multiple choice options. I need free recall, not recognition.
Do not invent lab values, doses or patient details that the source omits.
Mark any vignette detail you had to supply for coherence with [ASSUMED].
Turning existing multiple-choice questions into recall cards
The most common conversion, and the one where most quality is lost.
Below are multiple-choice questions. Convert each into a Basic note:
- Front: the stem, rewritten so it is answerable WITHOUT the options.
If the stem only makes sense with options present, rewrite it into a
direct question. If that is impossible, skip it and say why.
- Back: the correct answer only.
- Then, for each distractor that represents a real confusable concept,
write one additional card testing what distinguishes it from the answer.
Drop distractors that are obviously wrong. They teach nothing.
QUESTIONS:
[paste]
Numbers, units and volatile facts
For every numeric fact, the card must carry its units in the ANSWER and its
precision in the QUESTION: "to the nearest [unit]".
If the value is one that changes over time (a price, a population, a
guideline threshold), append the date the source states, in the Extra or
Back field, as "as of [date per source]".
If the source gives no date for a changing value, do not make the card.
List it under SKIPPED instead.
Consistent tags
Before writing any cards, propose a tag taxonomy for this material: at most
3 levels, using :: for hierarchy, with a maximum of 12 distinct tags.
Show me the taxonomy and wait for my approval.
Then apply it. Every card gets exactly one topic tag and one source tag.
Never invent a tag outside the approved list.
Routing cards into subdecks
The deck column header creates decks that do not exist yet, so one file can build a whole subdeck tree.
This file uses a deck column. Header lines:
#separator:semicolon
#deck column:1
#columns:Deck;Front;Back;Tags
Column 1 is the full deck path, using :: for subdecks, e.g.
Pharmacology::Autonomics::Beta blockers
Assign each card to the most specific subdeck the source supports. Use at
most three levels. Do not create a subdeck holding fewer than 5 cards.
How Do You Audit a Deck the Model Already Wrote?
This is the section most generators do not have, and it is where the quality comes from. Generation is cheap; the second pass separates a deck you keep from one you abandon in week three.
Run this over any deck, including one you made by hand:
Audit the flashcards below. Do not rewrite anything yet.
For each card output: the card number, a verdict of KEEP / FIX / CUT, and a
one-line reason using exactly one of these codes:
TWO-FACTS the card tests more than one thing
AMBIGUOUS more than one answer fits the question
ORPHAN unanswerable without the source paragraph
GIVEAWAY the question contains the answer or a distinctive part of it
RECOGNITION tests recognition rather than recall
LIST asks me to recall a set or enumeration
LONG the answer is longer than one short sentence
UNSOURCED the fact is not in the source I supplied
DUPLICATE tests the same fact as an earlier card (give the number)
Then a summary line: counts per code, and the three worst cards.
CARDS:
[paste]
Then the rewrite, kept as a separate step on purpose. Auditing and fixing in one pass makes the model soften its own verdicts:
Here is your audit. Rewrite every card marked FIX, and split every card
marked TWO-FACTS into the appropriate number of cards.
Rules:
- A split produces N complete cards, never one card plus a fragment.
- A fix for AMBIGUOUS adds context to the question, never a hint to the answer.
- A fix for ORPHAN moves the necessary context INTO the question, in the
fewest words that make it answerable.
- Do not touch cards marked KEEP.
- Output the full corrected file in the import format, plus a list of the
cards you CUT and why.
A deduplication pass, because generating in batches produces near-duplicates that quietly double your review load:
Find near-duplicate cards: pairs testing the same underlying fact with
different wording. For each pair, recommend which to keep and why, in one
line. Do not merge them into a combined card — that reintroduces two facts
on one card. Output the numbers to delete as a plain list.
And the grounding check, which is the one to run on anything that matters:
For every card, quote the exact sentence from the source that supports the
answer, copied verbatim, in a third column called Evidence.
If you cannot find a verbatim sentence, write NOT IN SOURCE.
Do not paraphrase into the Evidence column. Do not summarise.
I will delete every card marked NOT IN SOURCE.
That last prompt is worth more than the other twenty-seven combined. The Evidence column gets deleted before import, which is exactly what Wozniak means by sources accompanying items without being part of the learned knowledge.
What Does a Complete Import File Look Like?
A full file that imports as-is. It mixes note types with the notetype column header, which maps fields implicitly: "The first regular column is used for the first field of any note regardless of its note type, the second regular column for the second field, and so on."
#separator:semicolon
#html:false
#columns:Notetype;Deck;Field 1;Field 2;Tags
#notetype column:1
#deck column:2
#tags column:5
Basic;Pharmacology::Autonomics;Which adrenergic receptors does propranolol block?;"Beta-1 and beta-2; it is non-selective";pharm::beta-blockers source::lecture-04
Basic;Pharmacology::Autonomics;Propranolol is contraindicated in which airway condition?;Asthma;pharm::beta-blockers source::lecture-04
Cloze;Pharmacology::Autonomics;Propranolol is a {{c1::non-selective}} beta blocker.;Lecture 4, slide 12;pharm::beta-blockers source::lecture-04
Cloze;Pharmacology::Autonomics;Beta blockers reduce heart rate by antagonising {{c1::beta-1}} receptors in the {{c2::sinoatrial node}}.;Lecture 4, slide 13;pharm::beta-blockers source::lecture-04
Basic;Literature::Melville;Who speaks the opening line of Moby-Dick?;"The narrator, ""Ishmael""";lit source::seminar-02
Five rows, four things demonstrated. Row 1 has a semicolon inside a field, so the field is wrapped in quotes. Row 4 uses two cloze numbers and therefore produces two cards from one note. Row 5 contains literal double quotes, each doubled per the manual's escaping rule. Every row carries a source:: tag, so a bad lecture can be found and purged with one search later.
Save as .txt in UTF-8, then File then Import. The preview screen shows the parsed columns before anything is written: a wrong column count is visible there, not after 300 notes are in your collection.
For the multi-line case, the file changes shape:
#separator:semicolon
#html:true
#notetype:Cloze
#deck:Biochemistry::Glycolysis
#columns:Text;Extra;Tags
Glycolysis step 1: glucose is phosphorylated by {{c1::hexokinase}}.<br>This step consumes {{c2::one ATP}}.;Lehninger ch14;biochem source::ch14
Net ATP yield of glycolysis is {{c1::2 ATP}} per glucose.;Lehninger ch14;biochem source::ch14
#html:true is what makes <br> a line break, and it is required here because quoted multi-line fields do not work with cloze deletions spanning several lines. The cost: every literal <, > and & in this file must now be escaped.
When Should You Not Let a Model Write the Cards?
This matters more than any of the formatting above. The model works from what you give it. Cards generated from your source material are an extraction job, and they are reliable the way careful reformatting is reliable: check a sample, and if the sample is faithful the rest almost certainly is. Cards generated from the model's own knowledge are claims. Some are right, some are subtly wrong, and nothing about a card's appearance distinguishes the two.
Then spaced repetition does its job. A wrong fact you drill on a schedule is worse than no card at all, because you are memorising an error on purpose, with a system engineered to make it stick, and you will recall it with total confidence in the room where it costs you something. The failure mode of a bad deck is not that you learn nothing. It is that you learn something false, fluently.
There is a shortcut that makes this worse: asking a model to generate cards on a topic with no source, because it is faster. It is faster. It also removes the only thing that made the output checkable. No source means no audit, and every card becomes an unverified claim with a review schedule attached. Models fabricate confidently, as we cover in why ChatGPT makes things up, and a flashcard is a uniquely bad place to find that out. The same discipline drives source-grounded prompting in NotebookLM.
One note on tooling. Anki is the target here because its import format is documented. Other apps import text files too, but their specifics are theirs and we have not verified them. The card-quality rules port anywhere; the header lines do not.
Where a Prompt Library Fits
Everything on this page runs in any capable model, for nothing, with no account.
What eventually goes wrong is not the prompts. It is that the constraint block and the format block are 40 lines you paste, correctly, every time you sit down with a new chapter, and the version you refine in week six is not the one saved in your week-one note. That is the problem a prompt template library solves.
Prompt Architects generates and stores the prompt, not the deck. Nothing in the product imports to Anki, produces .apkg files, or knows what a cloze is; there is no flashcard feature on our features page and none hiding in the pricing table. What it does is hold the block above as a saved template with variables for deck name, source and card count. The free plan publishes five prompt enhancements per day, forever; saved prompt storage and the template library start on the paid tiers listed on pricing.
The rest of what we have built in this format is collected in every free prompt generator we have published.
Stop rewriting prompts. Start shipping.
Works with ChatGPT, Claude, Gemini, Grok, Midjourney, Ideogram, Veo3 & Kling. 5.0★ on the Chrome Web Store.
Create An AccountSources. Every claim about Anki's behaviour on this page was verified against the Anki Manual on 28 August 2026: Text Files for separators, quoting, HTML handling and the header table; Adding/Editing for cloze syntax, hints and image occlusion; Card Generation for how cloze numbers become cards; and Getting Started for the standard note types and the :: subdeck convention. The card-formulation rules come from Piotr Wozniak's Effective learning: Twenty rules of formulating knowledge, dated February 1999 (updated), which Anki's own cloze documentation links to. Anki is actively developed; re-check the header table before relying on it.