1. You are shipping a Gemini-powered customer support summarizer that must not invent refunds or policy exceptions. Would you rely on prompt-only guardrails or add retrieval plus constrained decoding, and what metric would you track to catch silent regressions in hallucinations?
Compare the instruction-only and evidence-constrained contracts for refund and policy claims, including trusted context placement, allowed output behavior, fallback handling, and the claim-support metric used for regression gating.
I would not rely on prompt only guardrails. I would retrieve trusted refund and policy evidence, keep that evidence separate from the customer conversation, tell Gemini to use only that evidence for sensitive claims, and constrain the output to a defined JSON structure. I would then validate each refund or policy claim against the retrieved evidence. If support is missing or conflicting, I would return a safe unknown result or escalate. For regression gating, I would track claim support, which is supported factual claims divided by evaluated factual claims.
A support summary can cause real problems if it tells a customer that a refund or special exception exists when the approved rules do not say that. Instructions alone are not enough because the model can still produce a confident sounding mistake. I would first look up the trusted company rules that apply to the conversation. Then I would make the summary use those rules as its source of truth. If the rules do not support an answer, the system should say that it does not know or send the case to a person.
- Which policy sources are approved as trusted evidence for refund and exception claims?
- Should unsupported or conflicting cases always go to a human, or can the product return an explicit unknown result?
- Which prompt versions, model versions, and customer data slices should be included in the regression gate?
I would use an evidence constrained contract rather than prompt only instructions. The customer conversation is untrusted input. The refund policy, exception rules, service rules, and other approved documents are trusted context. Retrieval finds the most relevant trusted passages and keeps their source identifiers.
Gemini receives the trusted context separately from the customer text. The instructions say that refund and policy claims must come only from that trusted context and must cite supporting sources. If the evidence does not support a claim, the allowed result is an explicit unknown response instead of an invented answer.
I would also constrain the response to a defined JSON structure. This controls the format, but it does not prove that the facts are correct. After generation, the application performs a separate semantic claim support check. Each factual refund or policy claim is compared with the retrieved trusted evidence. Missing or conflicting evidence causes a safe fallback, such as an unknown response or human escalation. A retrieval miss can also trigger broader retrieval and another attempt.
For regression gating, I would track claim support as supported factual claims divided by evaluated factual claims. Higher is better. I would compare it across prompt versions, model versions, and important data slices. This catches silent regressions where the output still has valid structure but the model starts making unsupported claims.
SYSTEM:
You summarize customer support conversations.
TRUSTED POLICY CONTEXT:
{{retrieved_policy_passages_with_source_ids}}
RULES:
Use only the trusted policy context for refund and policy claims.
Cite the source identifier that supports each factual claim.
If the trusted context does not support a refund or policy conclusion, return an unknown result.
Do not create a refund rule or policy exception that is not supported by the trusted context.
Return only JSON that matches the required schema.
CUSTOMER CONVERSATION:
{{customer_conversation}}
TASK:
Summarize the conversation and report only refund or policy claims that are supported by the trusted policy context.{
"type": "object",
"properties": {
"summary": {
"type": "string"
},
"refund_claim": {
"type": "string",
"enum": [
"Yes",
"No",
"I don't know"
]
},
"policy_exceptions": {
"type": "array",
"items": {
"type": "string"
}
},
"citations": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"summary",
"refund_claim",
"policy_exceptions",
"citations"
],
"additionalProperties": false
}Interviewers want to see whether I understand the limit of instructions alone when a model handles sensitive refund and policy claims. They are testing whether I can separate trusted policy evidence from customer text, constrain the output structure, validate factual claims after generation, choose a safe fallback when evidence is missing, and measure silent hallucination regressions with a useful production metric.
A common mistake is trusting a strong prompt as if it guarantees factual behavior. Another mistake is mixing customer text with trusted policy text without clearly separating their roles. Teams also sometimes treat valid JSON as proof that the content is correct, but schema validation checks structure, not factual support. Another mistake is accepting a citation simply because a citation field exists instead of checking whether the cited evidence really supports the claim. Finally, using an undefined confidence score as the main safety gate can hide failures. The stronger check is whether each sensitive factual claim is actually supported by trusted evidence.
Start with the decision. Say that prompt only guardrails are not enough for sensitive refund and policy claims. Then walk through trusted retrieval, evidence constrained instructions, structured output, semantic claim support validation, safe fallback, and the claim support regression metric. Make the difference between format validation and factual validation very clear.









