Prompt Engineering

Share
Prompt Engineering
Prompt Engineering in AI

Google keyword search habit issue

We are all so tuned to Google search that we tend to do similar search queries in an AI model as well. But, AI model capability is much different than tradition key word searches in search engines. We must come out of the keyword search mindset when we use AI models due to the nature of their awesome input capabilities.

Then, what is Prompt?

Unlike keyword search, at its simplest, a prompt is the input with a specific set of instructions, questions, or data you provide to an AI model to elicit a desired response, since an AI Model can take a wide variety of inputs (prompts) and generate responses dynamically.

💡
The input (instructions + data) you give to an AI model to tell it what to do.

Core Components of an Effective Prompt

A good prompt often has multiple parts:

  1. Instruction
    • “Explain…”, “Write…”, “Compare…”
  2. Context
    • Background info
    • “For first-time home buyers in Texas…”
  3. Input data
    • Text, numbers, or examples
    • “Here is the content: …”
  4. Constraints or Output Indicators (optional)
    • Length, tone, format
    • “In 3 bullet points”, “Use simple language.”

Basic prompt:

💡
Explain mortgages.

Better prompt:

💡
Explain mortgages in simple terms for a first-time home buyer in Texas. Keep it under 150 words and use bullet points.

Advanced prompt:

You are an expert in the requested domain. Think step-by-step and produce a high-quality, structured response.

GOAL:

  • Deliver clear, practical, and actionable output
  • Avoid fluff, avoid generic explanations

FORMAT:

  • Start with a concise summary
  • Then provide structured sections with headings
  • Use bullet points where helpful
  • Include examples where relevant

STYLE:

  • Clear, modern, and concise
  • Avoid jargon unless necessary
  • Write like a top-tier consultant

CONSTRAINTS:

  • Be specific, not vague
  • Avoid repeating the same idea
  • Focus on usefulness and clarity

If the request is ambiguous, make reasonable assumptions and proceed.

Now complete the following task:
[PASTE YOUR TASK HERE]

How Prompts Work "Under the Hood"

When you send a prompt, the AI model does this

  1. Tokenization: It breaks your words into smaller chunks called tokens.
  2. Pattern Recognition: It analyzes the relationships between those tokens based on its massive training data.
  3. Probability Mapping: It predicts the most likely sequence of tokens that should follow your input to satisfy the request.

The Concept of "Prompt Engineering"

This is the practice of refining prompts to get the highest quality output. It often involves specific techniques:

Zero-Shot: Asking for a task with no examples (e.g., "Translate this to French").
Few-Shot: Providing a few examples of the desired output style before asking the question.
Chain-of-Thought: Asking the AI to "think step-by-step" to improve its reasoning logic.
Role Prompting: Telling the AI to act as a specific persona (e.g., "Act as a senior software architect").

As you can see above, you must be able to create better or advanced prompts (AI Input), which are much different than keyword searches. Therefore, we must not follow traditional keyword searches in AI Models. Moreover, traditional search engine technology is built on indexing technologies and is built to take keywords.

💡
A prompt is like giving instructions to a highly skilled assistant.

Generating responses the way you want

As you can see, Input (a query traditionally) is a Prompt that can be tweaked in order to generate required responses, unlike traditional systems or keyword search engines.

  • Vague prompt → average result
  • Clear prompt → powerful result
The more precise and descriptive your prompt, the more relevant and accurate the AI's response will be.

Uploading files as input

Moreover, you can upload many files to many AI agents, such as ChatGPT or Google Gemini, and add an input or a prompt (a query traditionally) against those uploaded files, and add input requirements. Those agents are capable of handling such large input, unlike traditional systems or keyword search engines.

So, what's the maximum length of a prompt?

In AI models, the “prompt size” is part of the context window.

💡
Context window = total tokens of prompt + memory + response

That size shows how much each AI Model is capable of handling the input. On an almost quarterly basis, Prompt sizes have expanded significantly compared to the earlier generation of AI Models.

The "prompt size" (part of the context window) is typically measured in tokens (roughly 0.75 words per token) rather than characters or words. Check this AI Tokens article to understand tokens.

Examples

ChatGPT (GPT-5.4 Thinking) allows 272,000 tokens (400–500 pages)
Google Gemini 3.1 Pro allows 10,000,000 tokens (15,000 pages)
what's

Note: On an almost quarterly basis, these models tend to add more context window length to enable more and more use cases. Check those models' versions, plans, and documentation for the latest context window.

Significant input capabilities

As you can see above, prompt size or context window size, AI Models are capable of handling large input, processing large input, and generating large output.

💡
Therefore, Prompt Engineering comes into the picture. You need to engineer an input (prompt) to leverage the AI Model's capabilities.
Best responses with Engineered Prompt in AI

Check out relevant topics

What is an AI Model?
An A.I. Artificial Intelligence Model is trained on data to recognize patterns, make predictions, or perform actions based on input. Practical AI Model Example: GPT stands for “Generative Pre-trained Transformer”. ChatGPT is built on the GPT AI Model where users can chat on top of GPT model technology. Transformer
AI Tokens
💡AI doesn’t see raw sentences—it sees tokens as numbers. Why Tokens? Unlike the traditional way of storing and retrieving data, the AI Model shall build relationships between the text and generate text with the right context, so it requires a special data structure (Vectors) to store it in