Lesson 5.1 Understanding Natural Language Processing (NLP) and Prompt Engineering
Lesson 5.1 Understanding Natural Language Processing (NLP) and Prompt Engineering
Prompt Engineering – Experiment & Inquiry
Prompt Engineering – Experiment & Inquiry
- Question Prompt: “How does the way we ask a question influence the AI’s response?”
- Hands-On Prompt Experiment:
- Students test different prompt structures on ChatGPT and DeepSeek.
- Compare AI-generated responses to simple vs. complex prompts.
- Techniques of Prompt Engineering
- In-context learning
- Chain-of-thought
- Least-to-most prompting
- Self-refine
- Tree-of-thought
- Maieutic prompting
- Each student investigates one of the prompt engineering techniques listed above and explains it in class.
☑️In-context learning
In-context learning is particularly relevant in artificial intelligence, where models like GPT (Generative Pre-trained Transformer) learn to generate text or perform other tasks by observing examples directly fed into them during their operation rather than being pre-trained with a labelled dataset.
☑️Chain-of-thought
Chain-of-thought (CoT) prompting is a technique that allows large language models (LLMs) to solve a problem as a series of intermediate steps before giving a final answer. Chain-of-thought prompting improves reasoning ability by inducing the model to answer a multi-step problem with steps of reasoning that mimic a train of thought. (Wiki)
☑️East-to-most prompting
In Education:
Least-to-most prompting is a teaching strategy used to support learning and skill acquisition, particularly in special education or when teaching new tasks. It involves starting with the least intrusive prompts and gradually moving to more direct and specific prompts if the student does not respond to the less intrusive ones. This method helps learners become more independent by minimizing dependence on the teacher's guidance.
In Artificial intelligence
Least-to-most prompting in the context of prompt engineering for AI, particularly with models like GPT (Generative Pre-trained Transformer), involves a systematic approach to refining prompts from the most general to the most specific, based on the responses generated by the AI. This technique helps elicit more accurate or contextually relevant information from the model by gradually increasing the specificity or complexity of the prompts as needed.
☑️Self-refine
Self-refine prompts the LLM to solve the problem then prompts the LLM to critique its solution and then prompts the LLM to solve the problem again in view of the problem, solution, and critique. This process is repeated until stopped, either by running out of tokens or time or by the LLM outputting a "stop" token.(Wiki)
☑️Tree-of-thought
Tree-of-thought prompting is a technique used to guide brainstorming or idea generation by branching out from a central concept or theme.
☑️Maieutic prompting
Maieutic prompting is a method of questioning used to stimulate critical thinking and elicit insights or knowledge from individuals, often associated with the Socratic teaching method. It involves asking thought-provoking questions to guide dialogue and discovery, helping individuals arrive at their understanding or solutions through inquiry and reflection.