What a prompt is

A prompt is an instruction for a language model. Everything an LLM receives as input is part of the
prompt: the user’s question, the system instruction, context pulled from a database, the
conversation history.

In a product context the prompt is what defines the behaviour of an AI feature: how the model
answers, what it may and may not say, and in what format it returns the result.

Types of prompt

System prompt — sets the role, the context and the constraints. Invisible to the user. For
example:

You are a consultant for an online sports equipment store.
You help shoppers choose a product.
Answer only questions related to products in the catalogue.
Do not mention competitors. Ask clarifying questions.

User prompt — the message the user types into the interface.

Few-shot examples — sample question-and-answer pairs included in the system prompt to teach the
model the format you want without any fine-tuning.

Prompt engineering: how to improve the result

A good prompt is not the first attempt but an iterative process:

  1. Role: who you are — “consultant”, “assistant”, “expert”. The role sets the tone.
  2. Task: what exactly to do — “help choose”, “answer the question”, “build a list”.
  3. Constraints: what not to do — “do not mention competitor prices”, “do not give medical
    advice”.
  4. Format: how to shape the answer — “at most 3 sentences”, “as a bulleted list”.
  5. Examples: two or three samples of correct answers reduce the uncertainty.

Important: a longer prompt does not mean a better result. Contradictory instructions inside
one prompt make behaviour less predictable. The rule: whenever instructions can conflict, each one
needs a clear priority.

A prompt in the context of RAG

In RAG (retrieval-augmented generation) systems the prompt is enriched dynamically with data from a
knowledge base. For an AI Shopping Assistant that means the cards of relevant catalogue products are
injected into the prompt, and the model answers from real data rather than from what it absorbed
from the internet.

This is the key mechanism against hallucinations in e-commerce: the model does not invent product
specifications — it receives them through the RAG layer.