The refinement pattern improves AI results by iteratively changing a prompt from general to specific, seeking responses that are more accurate, relevant, or sophisticated. Specific questions generally produce more specific results, while each prompt builds on the interaction before it. section 2.1.1 section 2.5
A practical refinement loop typically:
- Asks the AI to improve an initial question or prompt. section 2.1.1
- Adds constraints such as a role, language, audience, requirements, or desired output format. section 2.1.1 section 3.2
- Drills from broad goals into functionality, components, files, and implementation details. section 3.2
- Reviews each response and continues refining rather than treating generated output as final. section 2.1.1 section 3.2
From linked-list definition to implementation
A general request for a singly linked list becomes a prompt asking for nodes, links, and basic operations in pseudocode. A later refinement requests Python, then another asks for a method that reverses traversal. The resulting interaction moves from conceptual structure to executable code and a concrete reverse operation. section 2.1.1
From system goal to package structure
A broad information technology asset-management goal can be refined with Python, hexagonal architecture, inventory, lifecycle, allocation, and compliance requirements. Further prompts request an enhanced design, a package structure, and a specific asset schema. section 3.2
|
|
Going forward, when I ask a question, try to formulate a better question. As an intern who studied computer science in college, how would you define a singly linked list in pseudocode? |
Browse a representative reformulation that turns a linked-list question into a more specific request covering structure and fundamental operations. section 2.1.1
