A prompt is the instructions and context supplied to an LLM to guide its response. In an application, vague wording can leave important choices to the model: a legal assistant told only to “answer legal questions accurately” gave contradictory advice to users asking identical questions. A production prompt should specify the behavior the application needs, not merely name the task. section 2.6.2 section 10.5.2
Specificity changes the response
“The ocean is” gives the model little direction and may produce a long continuation. “Finish this thought in one sentence: The ocean is” supplies both a task and a length constraint. The result is more targeted, though a more predictable format does not by itself establish accuracy. section 2.6.2
For an application prompt, specify the parts that would otherwise be ambiguous:
- Instructions: state the action, such as summarizing an order status or recommending products. section 2.6.2
- Context and input: identify the domain and include the customer’s query so the response addresses the particular request. section 2.6.2
- Response expectations: set qualities such as tone and length; for production use, also define behavior for requests beyond the assistant’s capabilities. section 2.6.2 section 10.5.2
A prompt can also constrain how supplied evidence is used. In a health-care policy assistant, retrieved policy chunks are formatted as context, and the prompt instructs the LLM to answer only from that context. The application returns source information with the answer so a user can check which policies informed it. Retrieval, prompt wording, and a low temperature setting work together to encourage grounded answers; none makes an answer automatically correct. section 4.5.4
At scale, treat prompts as quality contracts: define the expected tone, specificity, length, and handling of unsupported requests, then check whether those expectations hold across varied inputs. Keep versions so a change in behavior can be associated with a particular prompt rather than an untracked edit. section 10.5.2
PROMPT_VERSIONS = { #1
"customer_support_v1.0": "You are a helpful customer support agent...",
"customer_support_v1.1": "You are a helpful customer support agent.
Always be empathetic...",
"customer_support_v2.0": "You are a customer support agent for AcmeSoft..."
}
def get_prompt(version="latest"): #2
if version == "latest":
version = max(PROMPT_VERSIONS.keys())
return PROMPT_VERSIONS[version]
A Python dictionary stores named prompt versions, and a retrieval function selects one. This makes a prompt revision an identifiable application change. section 10.5.2

















































