Prompt Engineering
Historical work with LLMs: controlled heuristics, reproducibility, evidence discipline
This exercise was translated automatically from the German original and can contain errors. Consult the original version in case of doubt.
Overview and Didactic Goal
This exercise makes prompting visible as a method: prompts here are not “tricks”, but operationalizations of historical work tasks. (Campbell 2025; Oberbichler and Petz 2025)
You train how you
- delimit tasks cleanly,
- format an answer so that you can check it,
- control the sources of error, and
- document results reproducibly.
Unlike the thematic exercises (Research Question, Literature Research, Source Search, Source Criticism, Writing, Citing, Public History), this unit focuses on the common infrastructure: prompt design, choice of role, iteration and optimization.
As soon as the model delivers facts, literature, archives, references or citations that do not come from your input or from verifiable records, treat that as a hypothesis and not as a result. (Bender et al. 2021) Your work stays the same: counter-check, record, decide.
At a Glance
| Item | Value |
|---|---|
| Duration | about 150 minutes |
| Level | Beginner |
| Core path | 1 → 2 → 3 → 4 → 6 → 7 → 8 |
| Optional deepening | 5 (structured reasoning trace) |
| Hand-in (minimum) | AI log with at least 8 entries |
The core path leads you to a complete result in about 150 minutes. The optional deepening costs about 30 minutes more.
This exercise is the basis for all other exercises. Plan more time for the first run, because you also set up your AI log here.
What You Need
Subject knowledge
- A basic understanding of historical research methods
Capabilities of the AI system
The system must be able to do the three following things:
- Read a file that you upload, and quote from this file. You need this in step 3 and in step 4.
- Deliver an answer in a format that you prescribe, for example as a table.
- Start a new session. In this exercise you check what the system carries over from earlier sessions.
Other tools and access
- A file for your AI log. A text file or a document in your word processor is enough.
- The material package from the section “Case package for all exercises”. For it you download a freely accessible source.
You can do every exercise with AI systems from different makers. What a system can do depends on the product and on your account. Settle the five following points before you start.
Cost
A free account is enough for short text tasks. For some capabilities you need a paid account. This mostly concerns the search on the web, the reading of long files and the built-in reasoning mode. Check first whether your university provides access.
Tools
Check which tools your account unlocks. Can the system search the web? Can it read a file that you upload? Can it call external services? Each exercise names the capabilities that it requires.
The section Check and classify capabilities explains five newer capabilities. It also describes what each capability means for your work with sources.
Memory
Some systems carry over statements from earlier sessions or from a project context. Check the settings for memory, projects and chat history. A new session therefore guarantees no empty context.
Account: institutional or private
Check which account you work with. The rules differ in three points.
| Point | Account of your institution | Private account |
|---|---|---|
| Contract | Your university concludes it and shares the liability. | You conclude it yourself and carry the liability alone. |
| Training | A contract often excludes the use of your inputs. | Many providers use inputs for training. |
| Permitted material | The university rules which data you can enter. | You have no such rule and carry the risk yourself. |
Ask the IT office or the library of your university when you cannot find the rules. Record the answer in your AI log.
Do not upload material that you have no right to pass on. An upload leaves your computer and you cannot take it back.
These materials stay outside the AI system:
- Personal data of living persons, for example from interviews, from private papers or from holdings under a protection period.
- Digitized items whose terms of use forbid a disclosure.
- Unpublished texts of other persons, for example manuscripts or reviews.
- Licensed full texts, when the license of your library forbids a disclosure.
In case of doubt, work with a short excerpt or with an anonymized version. You can also use a local model, because the material then stays on your computer.
Law: data protection and disclosure
Two areas of law concern your work directly. This section gives an orientation and no legal advice.
Data protection. In the EU the General Data Protection Regulation applies. In Switzerland the revised Data Protection Act applies (Verordnung (EU) 2016/679 Zum Schutz Natürlicher Personen Bei Der Verarbeitung Personenbezogener Daten (Datenschutz-Grundverordnung) 2016, Bundesgesetz Über Den Datenschutz (DSG) 2020). Both laws protect personal data of living persons. The text of the law itself is binding. Article 6 GDPR requires a legal basis for every processing operation, and an upload is a processing operation.
The role of the provider decides the classification. A provider can act as a processor and process your data only on your behalf. Article 4 point 10 GDPR expressly excludes a processor from the third parties. This role needs a contract under Article 28 GDPR. Without such a contract, a provider uses your inputs for its own purposes. An upload is therefore not always a disclosure to a third party, but without a contract you must assume that it is. Check the contract that applies to your account.
Research is subject to safeguards, but it gets no exemption. Article 89(1) GDPR requires appropriate safeguards, for example data minimisation and pseudonymisation. Article 89(2) GDPR permits the legislator to derogate from single rights of the data subject. The information of the data subjects can also fall away, namely under Article 14(5)(b) GDPR. That applies only when the information proves impossible or would involve a disproportionate effort. Research therefore does not release you from the information duty in general. Settle your individual case with the data protection office of your university.
The European Data Protection Board presented a guideline on research in 2026 (European Data Protection Board 2026). This guideline was in public consultation until June 2026. It is therefore not applicable law, but an aid to interpretation. For deceased persons, the protection periods and the rules of use of the archive apply.
Disclosure. The AI Act of the EU governs the transparency of generated content (Verordnung (EU) 2024/1689 Zur Festlegung Harmonisierter Vorschriften Für Künstliche Intelligenz (Verordnung Über Künstliche Intelligenz) 2024). Article 50 applies from 2 August 2026. It separates two addressees: the provider of an AI system and the deployer. You are a deployer as soon as you use an AI system professionally. For purely private use you are not a deployer, under Article 3 point 4.
As a deployer you carry two separate duties from Article 50(4).
- Deep fake. If an AI system generates or manipulates an image, an audio recording or a video, and the content is a deep fake, then you disclose that. Under Article 3 point 60, a deep fake resembles existing persons, places or events and falsely appears authentic. A generated image without this resemblance to reality does not fall under this duty.
- Text on public matters. If you publish generated text to inform the public on a matter of public interest, then you disclose that. The duty falls away when a person reviewed the text and holds the editorial responsibility for the publication.
Article 50(4) therefore requires no disclosure for every generated image and for every generated text. Article 50(2) addresses the provider instead. The provider must mark generated content in a machine-readable format. This duty does not lie with you, and it does not replace your own disclosure.
The legal disclosure and the academic disclosure are two separate duties. Your university requires a declaration even when the law requires no disclosure. The exercise Citing shows how you declare your AI use.
Record your answers to these five points. They belong to the description of your work environment.
Learning Objectives
After the exercise you can:
- structure prompts (structured context, answer format, constraints, verification mode),
- use roles deliberately, for example source critic, research assistant, devil’s advocate or copy editor,
- choose zero-shot and few-shot prompting to fit the situation,
- request a structured reasoning trace (task decomposition, intermediate products, self-checks),
- run iterative prompting as a controlled workflow (generate → critique → revise → verify),
- optimize prompts against quality criteria (error reduction, format stability, verifiability, reproducibility),
- tell a requested reasoning trace apart from a built-in reasoning mode,
- name five newer capabilities of AI systems and classify their sources of error (reasoning mode, agentic workflows, retrieval from your own documents, handwritten text recognition, local models).
Working Mode: AI Log and A/B Testing
Keep an AI log. Use it in the other exercises as well.
An AI log is a short record of your AI use. In each entry you record five things: which material you entered, what you asked, what the AI answered, how you checked the answer, and how you decided.
The AI log works like a research journal. The way to the result stays traceable, for your readers and for you. You need the log later for the method section and for the disclosure of your AI use.
The German version of this course calls this record the KI-Protokoll. The English literature also calls it an audit trail. That term comes from accounting. There, an auditor follows a trail of records and traces each figure back to its origin. Your log does the same for your work steps. In these exercises we use only the term AI log.
Write the entry directly after the work step, and not at the end of the exercise. After one hour you no longer know the exact wording of your prompt.
Where you keep the log
You need no special tool. A text file or a document in your word processor is enough. A sheet in a spreadsheet program also works.
- Create one file per exercise.
- Give the file a clear name, for example
ai-log_source-criticism.md. - Write each entry below the previous one in the same file.
- Save the file together with your hand-in.
How long an entry is
An entry is short. It runs to five or ten lines and costs you one or two minutes. One entry covers one work step, that is one prompt and the answer that belongs to it.
Different rules apply to the prompt and to the answer:
- Prompt: verbatim. Copy the prompt exactly as you entered it. If the prompt is very long, copy the core passage and shorten with
[…]. - Answer: summarized. Summarize the answer in two or three sentences. Copy a passage verbatim only when you take that passage into your text, or when you want to document an error of the AI.
Each exercise states how much it requires. Some exercises name a number of entries, and others name a length in words. If an exercise names nothing, write one entry for each work step with AI.
Template for an entry
Copy this table again for each entry.
| Field | Content |
|---|---|
| Date | |
| Step (exercise, number) | |
| Goal (1 sentence) | |
| Material (input) | |
| Prompt (verbatim) | |
| Answer (short version) | |
| Verification steps | |
| Decision | |
| Reason (1 sentence) |
If you write in Markdown, copy this source text:
| Field | Content |
| ----------------------- | ------- |
| Date | |
| Step (exercise, number) | |
| Goal (1 sentence) | |
| Material (input) | |
| Prompt (verbatim) | |
| Answer (short version) | |
| Verification steps | |
| Decision | |
| Reason (1 sentence) | |A list with the same fields is equally valid. Choose the form that you fill in faster.
A filled-in entry as an example
The example comes from the exercise Source Criticism. A student there checks a memorandum of 7 July 1949.
| Field | Content |
|---|---|
| Date | 14 March 2026, 10:15 |
| Step (exercise, number) | Source Criticism, step 2 (external source criticism) |
| Goal (1 sentence) | I check whether the AI derives the formal data of the memorandum correctly from the text. |
| Material (input) | Memorandum Bern, 7.7.1949, Petitpierre/Hansen (Dodis 5020), full text from the edition copied into the prompt. |
| Prompt (verbatim) | “Analyse the following memorandum only from the viewpoint of external source criticism. Name the author, the addressee, the date, the text type and the form of transmission. Mark every statement that is not in the text expressly as an assumption. […]” |
| Answer (short version) | The AI names Petitpierre as the author, Hansen as the interlocutor and 7.7.1949 as the date. It calls the text a “minute of a Federal Council meeting”. It adds without marking that the memorandum lies “in the Federal Archives under the reference E 2001”. |
| Verification steps | I compared all statements with the edition at https://dodis.ch/5020. Author, date and interlocutor agree with the text. The text type does not agree: the text records a conversation, and it does not minute a meeting. The reference appears nowhere in the material. |
| Decision | Partly adopted. |
| Reason (1 sentence) | I adopt the author, the date and the interlocutor, I correct the text type to “memorandum”, and I reject the reference as unsupported. |
The entry shows the normal case: one part of the answer is usable, one part is wrong, and one part has no support.
Note the third category. The student does not claim that the reference is invented. She records only what she can check: the reference is not in the material. Whether the holding exists is a different question. You can call a statement wrong only after you checked it. Until then it has no support. This distinction is the core of source criticism, and it also applies towards the AI.
A/B Testing (Minimum)
Run at least two prompt variants for each technique. Then compare:
- format stability,
- overreach (speculation),
- fit with your next work steps.
Case Package for All Exercises
Use a concrete, controllable material package, as in the other exercises:
- Primary source: see the exercise Source Criticism.
- Context resource: see the exercise Research Question or Source Search.
- Optional secondary source: see the exercise Literature Research or Citing.
Hand the source over as a file. That is the normal case.
Only in the exceptional case, when the tool has no stable document access, copy (a) a text excerpt and (b) the metadata into the prompt. Separate the two visually, for example with three quotation marks.
Example layout:
"""
DOCUMENT TEXT (excerpt or full text)
"""
"""
METADATA (title, date, place, author, edition or URL, archive reference, access date)
"""
TASKStart each new task in a new session.
A restart forces you to hand the material over again. That raises the verifiability of your work steps.
A restart guarantees no empty context. Many systems keep a permanent memory, a project or workspace context, or a rule of the organization. Such systems carry statements from earlier sessions into a new session too.
Check therefore what your system carries over:
- Check the settings for memory, projects and chat history. These settings are the reliable record.
- Start a new session.
- Ask what the system knows about you and about your earlier tasks.
- Ask where these statements come from.
- Compare the answers with the settings. Note the differences in the AI log.
The answer of the system about its own memory is a self-report and not a record. Treat it like every other AI output: as a claim that you check.
Use a restart above all when:
- answers repeatedly make wrong connections,
- earlier roles or examples “leak through”,
- unclear assumptions from earlier steps carry on.
Rule to remember: A new session is a measure and not a guarantee. Claim reproducibility only after you checked the context that the system carried over.
1. Prompt Basics
Goal
Reformulate an imprecise request so that the answer becomes verifiable, format-stable and bound to the source or the input.
Exercise: From “vague” to “operationalized”
Vague request (intentionally bad):
Summarize the document and tell me what is important.Task: Build two clean prompts from it:
- Variant A (minimal): only goal and answer format.
- Variant B (robust): goal, structured context, constraints, answer format and self-check.
Take the setup from the exercise Source Criticism as your model (minimal paraphrase, at most 4 sentences).
Prompt scaffold (robust, adaptable):
Task: [concrete, 1–2 sentences]
Context: [seminar / research question / period]
Material: [document text + metadata, clearly separated]
Rules:
- Work only with the material.
- No additions from general knowledge.
- Mark uncertainties explicitly.
Output format:
1) Minimal paraphrase (max. 4 sentences)
2) 5 key terms (from the text)
3) 3 open questions (what stays unclear?)
Self-check:
- List 3 places where you would be tempted to speculate, and explain briefly why you do not.2. Roles
Goal
Use roles as methodological constraints: each role enforces different heuristics, blind spots and verification modes.
Exercise 2A: One Task, Three Roles
Choose one task from the other exercises, for example develop a research question, do external source criticism, build search terms for catalogues, or write a blog briefing.
Have the same task worked on in three roles:
- Source critic (close to the text, separate the levels) – see Source Criticism.
- Devil’s advocate (stress tests, counter-arguments) – see Writing.
- Structurer (work plan, intermediate products) – see Public History or Writing.
Role prompt (example: source critic, strongly limiting):
Role: source critic.
Task: Analyse the material only as a source (external + internal criticism).
Important:
- Separate strictly: [document text] / [edition or metadata] / [conclusion].
- No historical evaluations.
- Every conclusion needs support in the text or in the metadata.
Output:
1) Level table
2) 5 verifiable questions on authenticity and transmission
3) 5 hypotheses on bias and speaker position (mark them as hypotheses)Role prompt (example: devil’s advocate, derived from the writing exercise):
Role: devil's advocate.
Input: My working hypotheses (H1–H3) + notes on the material.
Task:
- Name the debatable assumption for each hypothesis.
- Formulate a stress test (which finding would overturn it?).
- Give 1 alternative reading (max. 2 sentences).
No external facts.Exercise 2B: Role Switch as Diagnosis
Take the best answer from 2A and have a second role check it, not rewrite it:
- Role “logic checker” (see the exercise Writing): consistency, jumps, missing evidence.
- Role “catalogue assistant” (see the exercise Literature Research): translates into search strings and indicators.
3. Zero-shot Prompting
Zero-shot prompting means that the model receives no examples, but only the task, the material and the constraints.
Goal
Use zero-shot as a baseline: fast, but prone to error. You learn where zero-shot is enough and where it evades systematically.
Exercise 3A: Minimal Paraphrase (Zero-shot)
Use the task from Source Criticism (minimal paraphrase, at most 4 sentences) as a zero-shot prompt.
Analyse the attached memorandum (Bern, 7.7.1949, Petitpierre/Hansen, Council of Europe) and answer:
- Who speaks or acts?
- What is the occasion?
- What is the central statement or decision?
- Which consequence is indicated?
At most 4 sentences. No interpretation.Check before every upload whether you have the right to pass the material on. The section “What you need” names the materials that stay outside the AI system. Free access alone permits no upload: a freely accessible source can still forbid a disclosure. Read the terms of use of the provider before you upload a file.
Upload the document as a PDF file together with the prompt. That is the normal case. Make sure that the AI also has access to the metadata. Retrieve the metadata online, or state it yourself.
Only in the exceptional case, when the upload does not work, copy the content of the document to the start of the prompt. Separate it visually, for example with “““. Example:
"""
DOCUMENT CONTENT
"""
"""
DOCUMENT METADATA (incl. URL)
"""
YOUR PROMPTDiagnosis:
Mark in the answer:
- the passages that do not follow clearly from the text,
- the implicit context assumptions (where does the model “know” more than your input?).
Exercise 3B: Three Research Questions (Zero-shot)
Use the template from the exercise Research Question.
Give me three possible historical research questions that follow from the memorandum.
Each question must be (a) limited in time, (b) verifiable against sources and (c) analytical.
For each question, name the additional source types that I need for the counter-check.Reflection: Which questions are (i) truly bound to the source, and which are (ii) “generic” questions that fit many cases?
4. Few-shot Prompting
Few-shot prompting means that the model receives explicit examples, which often leads to better answers.
Goal
Few-shot uses examples to stabilize categories, answer formats and quality standards.
Exercise 4A: Few-shot for the Separation of Levels (Document Text, Edition, Conclusion)
Write 3 to 5 short example sentences and label them. The sentences can be fictional, but they must be historically plausible.
Example:
Examples (input → label):
1) "Place: Bern; date: 7.7.1949." → [edition or metadata]
2) "In the text, neutrality serves as an argument against a step X." → [document text]
3) "It follows that Switzerland was fundamentally anti-European." → [conclusion] (too strong; needs a check or a weaker wording)
Task:
Now label the following 10 sentences from my material as
[document text] / [edition or metadata] / [conclusion].
For each label, give 1 piece of evidence (a quotation fragment or a metadata field) or "no support".
Material: ...Work assignment: Then take the few-shot block into your prompt from the exercise Source Criticism, and check whether the labels become more reliable.
Exercise 4B: Few-shot for Research Questions (Weak Against Strong)
Take 2 weak and 2 strong questions from your exercise Research Question or from the seminar. Enter them as examples with a short comment.
Scaffold:
Examples (weak/strong):
Weak: "Why did Switzerland join the Council of Europe?" → too broad, teleological, unclear evidence base.
Strong: "How was 'neutrality' operationalized in internal FDFA notes of 1949–1953 as an argument for or against an institutional rapprochement with the Council of Europe?" → clear operator, period, closeness to the sources.
Task:
Formulate 3 new research questions in the style of the strong examples.
For each question:
- Period
- Central operator terms (define them!)
- Expected source types
- 1 counter-check (which source could contradict?)5. Structured Reasoning Trace (Chain-of-Thought Prompting)
Chain-of-thought prompting names a procedure in which the model breaks a complex task into explicit intermediate steps (for example extraction → ordering → evaluation → result) and shows these steps.
You request these intermediate steps in the prompt. The structured reasoning trace is therefore a property of your input and not a property of the system. (Wei et al. 2022)
Goal
Break complex tasks into intermediate products (decomposition) and enforce a self-check. What counts is not a “long justification”, but intermediate steps that you can check.
Formulate the reasoning trace so that it stays short and auditable (bullet points, criteria, tests). The goal is verifiability and not a detailed “inner diary”.
Separate two things that look the same.
- The requested reasoning trace. You prescribed the steps in the prompt. You control the scope, the order and the checkpoints, and you can copy the prompt verbatim into the AI log.
- The built-in reasoning mode. The system produces intermediate steps on its own before the answer. You did not design this procedure, and many systems show you only a summary of it.
Only the requested reasoning trace is an artifact that you made yourself. Only it is therefore reproducible in your documentation.
The same limit applies to both forms. The visible steps do not prove the actual computation. Models name reasons that hide the real influence on the answer. (Turpin et al. 2023) Treat every reasoning trace as an aid to your check and never as evidence.
The section Check and classify capabilities goes deeper into the reasoning mode.
Exercise 5A: Argument Mapping with Intermediate Steps
Use the argument mapping from the exercise Source Criticism (claim, warrant, assumption, implication), but enforce the step logic:
Task: Produce an argument mapping for the passages on neutrality, compatibility and the decision process.
Procedure (show it):
1) Extract the relevant text segments (max. 5 short quotation fragments).
2) Formulate one claim/warrant/assumption/implication per segment (in keywords).
3) Self-check: Name 3 places where the jump from text to interpretation is delicate, and mark them as [speculation].
Rules:
- Use only the document text.
- No additional facts.
Answer: Markdown list.
Material: ...Exercise 5B: Research Plan as a Pipeline
Transfer the structure from Source Search (sub-questions → source types → search locations → search strings) into an explicit pipeline:
Replace the example question in the following prompt with your own question.
Goal: Build a research plan for the question: How did neutrality serve between 1949 and 1963 as an argument against an accession of Switzerland to the Council of Europe?
Steps:
1) Break the question into 4–6 sub-questions that I can check.
2) Assign 2–3 source types and arenas per sub-question.
3) Derive 2 search strings per sub-question (DE/FR/EN; Boolean).
4) Self-check: List 5 typical errors (anachronisms, invented references, terms that are too broad) and how you avoid them.
Answer: table (sub-question | evidence | search string | search location | risk).6. Iterative Prompting
Iterative prompting names a controlled work cycle in which you improve AI answers step by step, because you critique and revise each output deliberately.
Goal
Iteration as a controlled revision: you do not build “more text”, but improve the precision of the goal, the evidence discipline and the format.
Exercise 6A: Generate → Critique → Revise (Research Question)
- Generate (v1): zero-shot research questions (exercise 3B).
- Critique: use the critical comparison from the exercise Research Question (“Why is the aspect of neutrality missing?” and “Which sources support this?”).
- Revise (v2): have the AI revise the questions, but only along your points of criticism.
Critique prompt (template):
Insert the full text of the first answer after “Here is answer v1:”.
Here is answer v1: <insert the text of the first answer>.
Task: Critique it claim by claim:
- What is too broad or teleological?
- Where are operator terms or definitions missing?
- Where is the evidence base unclear?
Then give a revised version v2 (max. 3 questions) and a change log (max. 6 bullet points).
No new facts.Exercise 6B: Iteration on the Answer Format (Citing and Summarizing)
Take the exercise Citing and enforce a two-stage output:
- extraction of structured metadata (fields),
- only then the Chicago citation and the Zotero import format.
Optimization question: Does the two-stage form improve the diagnosis of errors, for example missing page numbers or wrong editors?
7. Prompt Optimization
Goal
Improve prompts systematically: not “prettier”, but more robust (less hallucination, better format stability, clearer verifiability).
Quality Criteria (Rubric)
Rate each prompt variant with 0 to 2 points per criterion:
- Input binding (does it really work only with the material?)
- Separation of levels (text against metadata against conclusion)
- Format stability (does it deliver what you asked for, without evading?)
- Error transparency (does it mark uncertainties?)
- Fit (can you use the answer directly, for example for an excerpt, an outline or a search log?)
Exercise 7A: “Harden” a Prompt (Literature Research)
Take a naive literature prompt (“Name the central literature on X”) and optimize it so that it works as a research assistant and not as a producer of sources. For guidance, see the exercise Literature Research (“no invented titles; no pretended knowledge of the catalogue; mark uncertainties”).
Optimized prompt (scaffold):
You are a historical research assistant.
Goal: a starting corpus for [topic / period].
Rules:
- Do not invent titles or authors.
- Make no claims about the coverage of a catalogue.
- Deliver instead: search strategies, search strings, expected literature types, and notes on verification steps.
Answer:
1) 8 search strings (DE/FR/EN) with a short justification
2) 5 expected literature types + where one typically finds them
3) 6 verification steps (how I verify, export and document hits)Exercise 7B: Prompt Optimization as an “Error Budget”
Define an error budget and optimize against it:
- Budget A: “0 invented titles” (literature),
- Budget B: “0 unsupported context assumptions” (source criticism),
- Budget C: “0 format violations” (for example at most 4 sentences, a table, claim IDs).
Run 3 iterations (v1 to v3) and record:
- which prompt change reduced which error field,
- which side effects appear (for example an answer that becomes too vague).
8. Check and Classify Capabilities
Goal
Name five newer capabilities of AI systems, check them in your own account, and classify them methodologically. Sections 1 to 7 train the prompt. This section concerns what the system does in addition to the prompt.
None of the five capabilities turns an output into evidence. Each one produces hypotheses, and you check each hypothesis against the original. (Bender et al. 2021) The capabilities only move where the error appears: in the reasoning mode, in the search step, in the retrieval, in the transcription or in the model itself.
8.1 Built-in Reasoning Mode
A reasoning mode is an operating mode in which the system produces intermediate steps on its own before the answer. Section 5 explains the difference from the requested reasoning trace.
- What you gain: long tasks with several conditions come out correct more often.
- What you lose: you did not design the procedure and you cannot record it verbatim.
- What you do: note in the AI log whether the reasoning mode was active. Note it as a setting, in the same way as you note the model and the date.
8.2 Agentic Workflows and Deep Research
An agentic workflow means this: the system plans several steps, calls tools and continues without a question to you. Deep research is the most frequent case. The system searches the web, reads pages and delivers a report with references after some minutes.
- What you gain: a broad first overview in a short time.
- What you lose: the control over each intermediate step. Errors from an early step travel into all later steps.
- What you check: each statement one by one. A report looks like a literature review, but it is a list of hits with hypotheses. Fabricated titles and wrong data in literature references are well documented. (Walters and Wilder 2023) The performance reports about such systems are often not reproducible either. (Kapoor et al. 2024)
- What you do: keep two logs separately. The search log records the date, the system, the query and the selection rules. The AI log records your task, the answer and your verification steps.
8.3 Retrieval from Your Own Documents
For retrieval from your own documents you deposit a collection of files. A search step selects passages from it and puts them before the system. (Lewis et al. 2020)
- What you gain: help to find passages. The system often names the location in your collection.
- What you do not gain: a binding of the answer to your collection. The retrieval widens the context. It does not make sure that the answer comes only from the passages that the search found. The system can still mix in knowledge from the training.
- What you lose: nothing of your duty to check. The search step does not find everything, and the system answers all the same.
- What you check: each statement against the original. A location reference supports the location and not the statement. Open the page that the system names and read it yourself.
- What you note: a deposited collection is an upload. The rules from the section “What you need” apply.
8.4 Multimodal Reading and Handwritten Text Recognition
Many systems today also read images. They can therefore process a digitized item. Handwritten text recognition turns a handwritten page into text. For German Kurrent script, general models with usable error rates exist. (Hodel et al. 2021)
This exercise is an exercise on source criticism. The error therefore stands in the foreground here.
- The error rate varies strongly. The script, the layout, the language and the condition of the original decide the result. No model transcribes every hand reliably. (Romein et al. 2025)
- General image models are weaker than specialized ones. The style of the script, the historical orthography and the language still cause considerable errors. (Díez García et al. 2025)
- The most dangerous error is the smooth reading. A general AI system does not stop at an illegible passage. It inserts a plausible word and marks nothing. That is a hallucination in the form of a transcription.
- Errors travel on. Errors in machine-recognized text change later analysis steps and therefore your results. (Strien et al. 2020)
Compare every citation with the digitized item before you adopt it. Note in the source analysis log that a machine recognized the text. Note the date and the display form as well. In your text, a transcription without this note is indistinguishable from a reading that you checked.
8.5 Local and Open-Weight Models
Three properties count here, and each one brings its own advantage. Keep the three apart, because they do not always appear together.
- Open describes the license. For an open-weight model, you can download the weights freely.
- Local describes the place of execution. A local model runs on your own computer.
- Small describes the size. Small models run on a current notebook with at least 16 gigabytes of memory.
An open-weight model does not necessarily run locally, because many providers run open-weight models on the network. A local model is also not necessarily economical, because a large local model needs much energy. Check therefore each property on its own.
- Data protection: only when the model runs locally does the material stay on your computer. Only then does the transfer to a provider fall away.
- Reproducibility: only when the weights are open do you keep one fixed version. A closed model can change without notice or disappear. (Spirling 2023)
- Energy: only when the model is small and the task is narrow does the energy demand per request drop clearly. (Luccioni et al. 2024)
- Limit: small models are clearly weaker on long texts and on questions of fact. Use them for narrow tasks, for example for a translation or for a summary.
This way is the minimal computing way of the course. Minimal computing asks how much computing power a project really needs. (Risam and Gil 2022)
Task 8A: Check the Capabilities of Your Own Account
Check your account and fill in the table. Answer with yes, no or unclear.
| Capability | Available? | Paid? | Where switched on? |
|---|---|---|---|
| Built-in reasoning mode | |||
| Agentic workflow or deep research | |||
| Retrieval from your own documents | |||
| Reading of images and scans | |||
| Local or open-weight model |
Do not rely on the statement of the system about itself. Check the settings and the price information of your account.
Task 8B: Reasoning Trace Against Reasoning Mode
Take the task from exercise 5A and run it twice.
- Run the prompt from 5A without the reasoning mode.
- Run the same prompt with the reasoning mode switched on.
- Note both answers in the AI log.
If your account has no reasoning mode, compare the prompt from 5A with a version without the prescribed intermediate steps instead.
Work Assignment (Reflection)
Write five to eight sentences on these questions:
- Which part of the result did you steer yourself in task 8B?
- Which part did the system steer?
- Which of the five capabilities would you use in a seminar paper, and which not?
- Which additional check does each capability that you use demand from you?
Short Library: Reusable Prompt Building Blocks
1) Context and material binding
Work only with the material below.
If information is missing, ask me or mark the place as [unclear].2) Separation of levels (source against edition against conclusion)
Mark each statement as [document text] / [edition or metadata] / [conclusion].3) Answer as an intermediate product (for further work)
Give the answer as a table with the fields: claim | evidence | uncertainty | next verification step.4) Enforce a self-check or a counter-check
Self-check: Name 3 plausible counter-records or alternative readings, and what you would need for them.Learning Outcome
At the end you hold these artifacts:
- An AI log with at least 8 entries, spread over the techniques.
- One short A/B comparison per technique, and 5 to 8 sentences of reflection. Describe there what improved or worsened in method terms.
- A “best practice” template. That is your personal standard prompt for (a) source criticism or (b) literature research or (c) writing support.
- The filled-in table from task 8A. It describes the capabilities of your account and belongs to the documentation of your work environment.
Further Resources
- Polo Club: Transformer Explainer – Interactive explanation of how transformer-based language models work.
- AI Pedagogy Project: Foundations of Generative AI – Next-token prediction and the basics of generative AI.
- AI Pedagogy Project: LLM Tutorial – Limits, hallucinations, verification and critical use.
- Prompt Engineering Guide – Vendor-neutral overview of prompting and its basic concepts.
- Prompt Engineering Guide: Techniques – Zero-shot, few-shot and chain-of-thought, each with examples.
- Prompt Engineering Guide: Risks and misuses – Prompt injection, invented facts and biases.
- Learn Prompting – Open course on prompting, from the basics to advanced techniques.
- Wikipedia: Prompt engineering – Encyclopedic overview with references to the research literature.
- YouTube playlist: Critical AI Literacy (Zentralbibliothek Zürich) – Video series on machine learning, language models, prompting, bias, data visualization, evaluation methods and open science. (GERMAN only)
- Sternfeld (2023) – Explains how a machine learning system “learns” from a dataset, and why AI works as a socio-technical system and not as an autonomous agent.
Bibliography
Citation
@inreference{mähr2025,
author = {Mähr, Moritz},
title = {Prompt {Engineering}},
booktitle = {Critical AI Literacy for Historians},
date = {2025-12-29},
url = {https://maehr.github.io/critical-ai-literacy-for-historians/en/exercises/prompt-engineering.html},
langid = {en}
}