Interview questions

Frequently asked questions with concise model answers. Try answering aloud before expanding.

How would you reduce hallucinations in an LLM app? Medium

Ground answers with RAG, instruct the model to cite sources and say 'I don't know', lower temperature, validate outputs against schemas or databases, and evaluate with a test set of known Q&A.

What is prompt injection? Hard

Malicious input that tries to override the system's instructions (e.g. 'ignore previous instructions'). Mitigate by separating untrusted content, limiting tool permissions, validating outputs and never exposing secrets to the model.