Databricks interview questions
AI startup · 4 questions reported
- junior 0
- mid 2
- senior 2
These are 4 technical questions candidates reported being asked in Databricks interviews for AI engineer, ML engineer and applied AI engineer roles, each with a model answer you can say out loud in a minute or two. They cover rag and prompt injection: 0 junior, 2 mid-level and 2 senior questions. Every question comes from a public interview write-up that names Databricks.Updated
Databricks prompt injection and defences questions
Model answer
Run a classifier on both sides: on the prompt before the model, and on the response after, because a harmless prompt can still produce a harmful answer. Start from a taxonomy, such as violence, self-harm, hate and jailbreaks.
A small fast model scores every request; borderline ones go to a larger judge, samples to humans. Tune thresholds per category, since false positives block real users. Feed red-team findings back into training.
Databricks retrieval-augmented generation questions
Model answer
Index more than files: parsed symbols with signatures and docstrings, the import and call graph, tests, docs and recent diffs. Chunk on syntax boundaries, a whole function with its path and class, not fixed windows.
Rank with several signals: exact identifier search, embeddings for intent, and graph expansion from symbols in the open file or stack trace, then a reranker. Cut noise by skipping vendored, generated and build files. Measure recall of the files the real fix touched, then task success: do the tests pass?
Model answer
Turn each asset into a searchable card: a table's name, columns and comments, tags, owner, sample values and lineage; a notebook's title, cell summary, and the tables it reads and writes.
Retrieve with exact match on table and column names plus embeddings on descriptions, filtered by access permissions first. Rerank with a cross-encoder and usage signals: query popularity, freshness, certified status, and lineage closeness to tables already in the session. Evaluate on logged requests: recall at k of the table the user really queried, then whether the SQL runs correctly.
Model answer
Queries mix exact identifiers, like a table name or catalogue path, with intent, like churn by region. Run a keyword index over names, paths and column names, and embeddings over descriptions and comments.
Normalise identifiers first, splitting snake_case and camelCase so cust_id matches customer id. Merge them with reciprocal rank fusion, but let an exact name match go straight to the top. Filter by permissions first, and tune on search logs.
Each question comes from a public interview write-up or video that names Databricks; the answers are ours. Not affiliated with Databricks.