Prompt / Prompt Engineering

Different “prompt” will result in different “Answers”.

e.g.

# Prompt A
Explain RAG.

# Response /answer may be
RAG stands for Retrieval-Augmented Generation...
# Prompt B
Explain RAG to a 10-year-old child.

# Response /answer may be
Imagine you have a smart robot...

A prompt includes : Role, Task, Context, output Format and Constraints

Role: it tells LLM who you are.

Role first,

e.g.

# your prompt:
You are a Senior Data Architect.
Explain Databricks.

# may response
Databricks is a unified analytics platform...

# your prompt
You are a primary school teacher.
Explain Databricks.

# may response
Imagine a big factory...
Task: it tells LLM what you want it to do.

Task should be clarity. e.g. “Explain RAG

Context: it tells the LLM “background”

e.g. your prompt : “Explain Databricks.” it’s too short to fully catch up what you are thinking and talking.

change the prompt to “I am an Azure Data Engineer. Explain Databricks from an Azure perspective.”

then the LLM will talk on databricks, and related ADF, ASA, ADLS, unity catalog ….

Output Format: it tells LLM what and how to output answer your “prompt”

e.g. your prompt looks:
Explain RAG.

Output:
1. Definition
2. Architecture
3. Example
4. Benefits

Constraints: it constraints LLM output response result.

e.g. Explain RAG
in 100 words.
Do not use technical terms.
Use only bullet points.

Sample Prompt Template

Role:
You are a Senior Data Architect.

Task:
Explain RAG.

Context:
Audience is Azure Data Engineers.

Output Format:
Table

Constraints:
Use simple English.
Maximum 300 words.

Enterprise-grade prompt example

messages=[
    {
        "role": "system",
        "content": """
You are an enterprise data architect.

Rules:
- Be concise
- Use bullet points
- Always structure answers as: Definition → Use case → Example
"""
    },
    {
        "role": "user",
        "content": "Explain RAG"
    }
]