Senior interview questionAsked at Databricks · interview write-up
A coding agent writes SQL and notebooks over a company's data platform. How would you retrieve and rerank the right tables and notebooks for a request?
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.
Practise the rest
22 RAG questions, 492 in all, each with a model answer. Free.
More from Databricks interview questions.
More RAG interview questions
- What is retrieval-augmented generation, and how does it reduce hallucination?
- How do you choose a chunking strategy for RAG?
- Why combine keyword and embedding search, and where does a reranker fit?
- How do you evaluate a RAG pipeline?
- Your RAG chatbot keeps giving wrong answers. How do you find out why, and fix it?
- Design a RAG system that has to meet strict latency and cost targets while serving many tenants.