certslothcertsloth
AIP-C01/Topic 02

AWS / Professional

Prompt Engineering, RAG and Fine-Tuning

2 min read5 recall promptsReviewed 2026-10-10

Memory hook: Prompt for instructions, retrieve for current evidence, tune for learned behaviour.

Must remember

  • A good prompt defines the task, relevant context, output format and constraints. Zero-shot uses no demonstration; one-shot/few-shot include examples. Templates standardise inputs. Version prompts and evaluation sets so improvements can be compared and rolled back; Bedrock Prompt Management supports managed prompt versions.
  • Structured reasoning prompts can help decompose a task, but an explanation is not proof of a model's internal process or correctness. Prefer checkable intermediate results and concise justifications. Negative instructions alone are weak enforcement.
  • RAG retrieves relevant content, adds it to a prompt and generates a grounded response. A typical path is ingest → clean → chunk → embed → index → retrieve → generate → cite. Bedrock Knowledge Bases manages supported parts of this workflow.
  • Vector storage can use supported OpenSearch, Aurora/PostgreSQL or other integrations; the exact service feature matters. Hybrid keyword/vector retrieval, metadata filtering and reranking can improve results. Enforce user access before evidence enters the prompt.
  • Fine-tuning changes model weights using task/domain examples; it can improve style and behaviour but is not a live fact lookup. Continued pretraining adapts using additional domain text. Instruction tuning uses instruction/response examples. RLHF uses human preference feedback. Distillation trains a smaller model from a larger model's outputs or behaviour.
  • Curate representative, licensed, deduplicated data and hold out evaluation examples. Full pretraining has far higher data/compute requirements than prompt changes or retrieval. Prompt caching can reuse eligible repeated context; it does not repair stale source facts.

Choose under exam pressure

Requirement Choice and reason
Answer questions about policies updated daily RAG over authorised current documents.
Consistent specialised output style across many tasks Evaluate prompting, then fine-tuning if needed.
Reduce a successful model's serving cost Evaluate a smaller model or distillation against quality targets.

Traps

  • RAG does not alter model weights.
  • Fine-tuning does not automatically grant access to new documents.
  • A retrieved document can contain hostile instructions; treat it as untrusted data.

Active recall

1. Which changes weights: few-shot prompting or fine-tuning?

Fine-tuning.

2. Why preserve metadata during chunking?

For filtering, authorisation, citations, freshness and document identity.

3. A correct document never appears in results. Which stage needs investigation?

Ingestion, indexing, filters or retrieval, before blaming generation.

4. What distinguishes continued pretraining from instruction tuning?

Additional domain text versus examples explicitly pairing instructions with desired responses.

5. Why version both prompts and evaluation data?

To reproduce comparisons and avoid attributing a changed test set to a model improvement.

Sources

CLOSE THE NOTES. EXPLAIN THE CHOICE.

How well could you recall it?

Your next review is based on this answer. Progress stays in this browser.

Search across every published topic.