AI basics

What Is Prompt Engineering?

Prompt engineering is the process of designing and testing instructions that guide an AI model toward a useful result. A prompt usually describes the task, relevant context, constraints and desired output. You improve it by checking actual responses against a defined goal.

Updated · J.A.R.V.I.S

What goes into a useful prompt?

Start with the task: what should the model do? Add the context it needs, such as the text to summarize or the audience for an explanation. State any limits and describe the output format.

For example, “summarize this” leaves important decisions open. “Summarize the supplied note for a new team member in three bullets; include the deadline and do not add facts” gives a clearer target.

A prompt engineering example: before and after

Suppose your source note says: “The workshop is Friday at 2pm. Bring a laptop. Registration closes Wednesday.” A vague request is “write a reminder.” A more specific request defines the audience, required facts and length; the full practice prompt is below.

Evaluate the result by checking Friday at 2pm, the laptop requirement and Wednesday's registration deadline. Also check whether the response invents a location or other details. This is an illustrative exercise, not a measured comparison of model performance.

How to test and improve a prompt

Decide what success looks like before revising the prompt. Keep a few representative inputs and check the output for factual accuracy, required details and format. Try the same task more than once when consistency matters.

When a response fails, identify the failure before rewriting. Missing facts may call for clearer source material; a wrong format may call for a concrete example. Compare revisions under similar conditions so the result tells you something useful.

Prompt engineering, fine-tuning and retrieval

Prompt engineering changes the instructions and context supplied to a model. Fine-tuning changes model parameters through additional training. Retrieval adds relevant information from a separate source to the model's context.

These methods solve different problems and can be combined. A clearer prompt cannot supply facts that the model has never been given, and a detailed instruction does not guarantee that every answer will be correct.

Practice with a small, checkable task

Choose a task where you can judge the answer yourself, such as extracting dates from a short note or following a word limit. Keep a simple record of the prompt, response and what you changed.

An AI challenge adds a fixed objective and game rules to this practice. On J.A.R.V.I.S, read the task briefing and attempt cost first, then review the published result rather than treating an AI claim as a confirmed win.

Practical examples

A complete practice prompt

Summarize this note for a first-time workshop attendee in exactly three bullets. Preserve the time, required item and registration deadline. Do not add facts. Note: The workshop is Friday at 2pm. Bring a laptop. Registration closes Wednesday.

Check all three source facts and the bullet count. If any detail is missing or changed, the output has not met the task.

A reusable prompt template

Task: [what you want done] Context: [relevant source material or audience] Constraints: [facts to preserve and limits] Output: [format and level of detail] If information is missing: say what is missing rather than inventing it.

Replace the brackets with your own task details. This is a starting point, not a guarantee of accuracy; review the generated output.

Explore a J.A.R.V.I.S challenge

Check the current challenge list for availability, rules and attempt costs. You can read the briefing even when a challenge has ended.

View Challenges

FAQ

What is prompt engineering in simple terms?

It means writing, testing and improving the instructions you give an AI model so its response better fits your task.

Do I need to code to learn prompt engineering?

No. You can start in a chat interface using ordinary language. Coding becomes useful when you want to automate tests or integrate prompts into an application.

What is the difference between a prompt and prompt engineering?

A prompt is one instruction or input to a model. Prompt engineering includes designing that input, testing responses and revising it against a goal.

Does a better prompt prevent hallucinations?

No. Clear instructions and relevant source material can help, but a model can still invent or misstate information. Check important claims against reliable sources.

How can I practice prompt engineering?

Use a short task with an answer you can check, compare two prompt versions and note which requirements each response met. You can also practice within an AI challenge's published rules.

Trusted external references

OpenAI: prompt engineering

Official guidance on writing instructions and giving models relevant context and examples.

Anthropic: define success before prompting

Start with clear success criteria and a way to evaluate the result.