Test prompt-template variable substitution
Medium70 pts~25 min
- Prompt templates
- Data-driven testing
Practice app · Acme Support Assistant
A deterministic LLM-style support assistant with retrieval (RAG), JSON mode, safety policies and tool calls, exposed via UI and API.
Your starter code already declares BASE_URL — call the API relative to it.
Objective
Fill a prompt template with variables and prove each substitution changes the answer correctly.
Your task
- 1Define the template "How long does {method} shipping take?" and the rows standard → “3–5 business days”, express → “1–2 business days”.
- 2Render the template for each row and assert the rendered prompt contains no leftover “{” or “}”.
- 3Send each prompt and assert the expected fact appears in output_text.
Acceptance criteria
- POST /ai/chat returns 200
- The rows are data-driven
- At least 4 assertions pass
LLM evaluation · AI Testing · Prompt & input testing