Legal document review · Production

Xcel Energy builds RAG-based chatbot with Databricks Mosaic AI, cutting rate case review from 6 months to 2 weeks

The problem

Xcel Energy's rate case review process took up to several months due to complex documentation, while leadership needed insights from hundreds of pages of earnings reports and the legal team needed faster access to customer contract details.

Workflow diagram · grounded in source
1
User query submission
trigger
“Xcel Energy's data scientists identified several high-value use cases to test, including rate case reviews, legal contracts reviews, and analysis of earnings call reports”
2
Document corpus ingestion
integration
“Databricks Notebooks and Apache Spark™ were leveraged to process large datasets from diverse sources, including government websites, legal documents, and internal invoices”
3
Data governance enforcement
validation
“Databricks Unity Catalog enabled centralized data management for both structured and unstructured data, including the document corpus for the chatbot's knowledge base. It provided fine-grained access controls that ensured that all data r…”
4
Vector embedding generation
ai_action
“The team utilized Databricks Foundation Model APIs to access state-of-the-art embedding models such as databricks-bge-large-en and databricks-gte-large-en which provided high-quality vector representations of the document corpus”
5
RAG retrieval and response generation
ai_action
“By utilizing Databricks Vector Search for similarity search and combining it with LLM query generation, the team built an efficient RAG-based system capable of providing context-aware responses to user queries”
6
REST API deployment
output
“It allowed the model to be exposed as a REST API endpoint with minimal setup. The endpoint could then be easily integrated into front-end applications”
7
Performance monitoring
feedback_loop
“The team created dashboards that tracked essential metrics such as response times, query volumes, and user satisfaction scores. These insights were crucial for continuously improving the chatbot's performance”
Reported outcome

Rate cases now take 2 weeks instead of up to 6 months.
The project significantly reduced the time taken for rate case reviews and improved data access and insights.

Reported metrics
Rate case review time2 weeks instead of up to 6 months
Time taken for rate case reviewssignificantly reduced
time to value for RAG deploymentsignificantly improving our time to value
Reported stack
Databricks Mosaic AIUnity CatalogFoundation Model APIsVector SearchMLflowModel ServingDatabricks NotebooksApache SparkLangChainMixtral 8x7b-instructLlama 2DBRXClaude Sonnet 3.5AWS BedrockAgent Bricks AI GatewayDatabricks SQL
Source
https://www.databricks.com/blog/xcel-energy-rag
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

Rate cases now take 2 weeks instead of up to 6 months.

What tools did this team use?

Databricks Mosaic AI, Unity Catalog, Foundation Model APIs, Vector Search, MLflow, Model Serving, Databricks Notebooks, Apache Spark, LangChain, Mixtral 8x7b-instruct.

What results were reported?

Rate case review time: 2 weeks instead of up to 6 months; Time taken for rate case reviews: significantly reduced; time to value for RAG deployment: significantly improving our time to value (source-reported, not independently verified).

How is this legal document review AI workflow structured?

User query submission → Document corpus ingestion → Data governance enforcement → Vector embedding generation → RAG retrieval and response generation → REST API deployment → Performance monitoring.