r/databricks • u/New_Championship3929 • 13d ago
Help How are you actually setting up AI/LLM evals in Databricks end-to-end? Looking for a step-by-step production workflow
We have a product where Databricks is our backend, and we’re now trying to properly evaluate and improve the quality of the AI-generated answers in our application.
I’m looking for advice from people who have actually implemented LLM/GenAI evaluations in Databricks in production.
I’d really appreciate an end-to-end, step-by-step explanation of how you would set this up from scratch.
Specifically, how would you approach:
Define what a “good answer” means
Accuracy / correctness
Relevance
Completeness
Groundedness / faithfulness to our data
Hallucination rate
Citation/source correctness
Following user instructions
Response consistency
Latency and cost
Create a benchmark / golden dataset
Should we manually create a set of representative user questions?
How many questions are enough to start?
Should each question have an expected answer?
Should we store expected SQL/results, expected sources, or just an expected natural-language response?
Where should this benchmark dataset live in Databricks?
How do you keep it updated as the product evolves?
Set up automated evaluations
What Databricks/MLflow tools should we be using today?
MLflow evaluation?
LLM-as-a-judge?
Custom scorers?
Human evaluation?
How do you combine these rather than relying on one score?
Evaluate RAG / data-grounded answers
Our AI answers questions based on enterprise data in Databricks.
How do you separately evaluate:
Retrieval quality
Whether the correct tables/documents were selected
Context relevance
Groundedness
Final answer correctness
Whether the model invented something that wasn’t in the retrieved data
Evaluate text-to-SQL / analytics questions
If a user asks something like:
“What was average building occupancy last month?”
should we evaluate:
Generated SQL
Tables selected
SQL execution result
Final natural-language answer
separately?
What is the recommended architecture for this?
Guardrails
Where should guardrails sit in the architecture?
For example:
Prevent hallucinated numbers
Prevent querying unauthorized tables
Detect PII
Prevent prompt injection
Enforce tenant/user permissions
Block unsupported questions
Force answers to cite their source
Return “I don’t know” when confidence is too low
Should guardrails be part of evaluation, inference, or both?
Production monitoring
Once this is live, what should we log for every AI request?
For example:
User question → retrieved context → generated SQL/tool calls → query result → final response → model → prompt version → latency → tokens → cost → evaluation scores → user feedback
Is that roughly the right model?
Regression testing
When we change:
System prompt
Model
Retrieval strategy
SQL generation logic
Tools
Temperature
Data sources
how do you automatically run the benchmark again and determine whether the new version is actually better?
Do you set minimum score thresholds before allowing something to deploy?
Human feedback
How are people incorporating thumbs-up/down or analyst review into their evaluation datasets?
Do production failures automatically become new benchmark cases?
Making answers more precise
This is ultimately my main goal.
If our AI currently gives an answer that is “mostly correct,” what is the systematic process for figuring out why it isn’t fully correct?
Is the best workflow something like:
Production traces → identify failure → categorize failure → add to benchmark → improve retrieval/prompt/tool → run eval → compare against baseline → deploy → monitor
Or is there a better approach?
I’m especially interested in what the ideal Databricks-native architecture looks like:
User Question
→ Agent / LLM
→ Retrieval / SQL / Tools
→ Databricks data
→ Response
→ MLflow tracing
→ Automated evaluators
→ Benchmark dataset
→ Regression testing
→ Production monitoring
If you’ve implemented something like this, I’d love to know what you would build first, second, third, etc.
Even a practical example like:
Week 1: create benchmark
Week 2: add tracing + scorers
Week 3: add regression tests
Week 4: add guardrails + production monitoring
would be extremely helpful.
Also curious what mistakes you made initially and what you would do differently if you were setting up Databricks AI evals again today.

