← Artificial intelligence

Neural networks and language models

Writing prompts

编写提示词

A prompt is the instruction you write to a language model. The clearer and more specific it is, the closer the answer gets to what you want, because the model only knows what you tell it.

A good prompt includes the task ("summarise"), the context ("for beginner students"), the format ("in three points") and limits ("under a hundred words"). Adding an example of the desired output improves the result a lot.

Example: instead of "explain networks", write "Explain to a high-school student the difference between a router and a switch in two paragraphs, with an example from home." The second prompt gives a much clearer answer.

Working with a model is iterative: if you don't like the answer, say what is missing and ask for a revision instead of starting over. You can also ask it to think step by step on complex problems.

Watch two things: don't put secret or personal information in a prompt, and check facts and numbers in the answer, because the model may state wrong information confidently.

Ask the AI assistant

Ask anything about this lesson and get a simple answer with the terms in Chinese, Arabic and English.

The AI assistant runs on Google's Gemini model and can make mistakes. Do not write personal information. Available to signed-in learners, up to 30 requests a day.

The content is simplified and covers the basics only.