Prompt: The instruction or input you give a generative AI tool to get a response, such as a question, a task, examples, and any context it needs.

Example

A weak prompt: "write test cases". A better one: "Write 8 test cases for a login form with email and password fields. Include invalid emails, empty fields, wrong passwords, and a locked account. Use a table with steps and expected results."

What Makes a Good Prompt

PartExample
Role or contextYou are reviewing Java code for a banking app
TaskFind bugs and security issues in this method
InputThe code, data, or document to work on
ConstraintsDon't change the method signature; Java 17
Output formatA numbered list with line numbers and fixes

Common Prompting Mistakes

  • Being vague, then blaming the tool for a vague answer.
  • Leaving out key context, such as the language version or business rule.
  • Asking for many unrelated things in one prompt.
  • Trusting the output without checking it.
  • Pasting confidential code or customer data into tools your company hasn't approved.

Prompts in Applications

When developers build AI features, prompts are part of the code: templates with instructions, examples, and retrieved data inserted at runtime. They are versioned, tested with sample inputs, and improved over time, just like other code. See large language model.

Related terms

Previous term: Project Discussion  |  Next term: Pull

Related guides

Frequently asked questions

What is a prompt in AI?

A prompt is the instruction or input you give a generative AI tool, such as a question, task, and context.

How do I write a good prompt?

Give context, a clear task, the input, any constraints, and the output format you want.

What is prompt engineering?

Designing and testing prompts so an AI model gives reliable, useful outputs, especially inside applications.

Is it safe to paste company code into AI tools?

Only into tools your company has approved. Many companies restrict this to protect confidential code and data.

Explore more internship terms

The IT Internship Glossary explains 199 terms you will hear before and during your internship, with simple definitions and real examples.

Browse all 199 terms
Dhaivat Ajwaliya

About the author

Dhaivat Ajwaliya

Dhaivat has 16+ years of experience in the IT industry, working on AI and cloud technologies, project delivery, and engineering leadership. He has interviewed and mentored many interns, wrote The Lost Intern, and runs the non-commercial Career Impact Initiative, mentoring students for free.