AI engineering glossary · Prompt context engineering

What is self-refine?

Self-refine: A loop in which the same model writes a draft, critiques it, and rewrites it using its own feedback, repeating a few times. It can raise quality on writing and code without extra training, though it can also reinforce mistakes the model cannot see.

Level: advancedTopic: Prompt context engineering

Self-refine: an example

A model drafts a cover letter, lists three weaknesses such as vague achievements, then rewrites the letter to fix them.

Related terms

More Prompt context engineering terms

Where you learn it

Self-refine is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.