Unlocking Operational Intelligence in Energy & Utilities with MindsDB Knowledge Bases & Hybrid Search

Unlocking Operational Intelligence in Energy & Utilities with MindsDB Knowledge Bases & Hybrid Search

Chandre Van Der Westhuizen, Community & Marketing Co-ordinator at MindsDB

Sep 18, 2025

MindsDB Use Case For Energy & Utilities
MindsDB Use Case For Energy & Utilities

Energy and utilities companies are generating more data than ever—across regulatory filings, field operations, ESG reports, equipment logs, safety audits, and customer service tickets. Yet, this data is often stored in silos: compliance data lives in PDFs, maintenance logs in internal portals, and customer feedback in helpdesk tools. From data engineers to analysts and software developers, teams are tasked with transforming this data into actionable insights that guide leadership’s most important decisions.


To unlock value, teams need a way to search, correlate, and act on this unstructured and structured data—securely, in real time.


That’s where MindsDB Knowledge Bases and Hybrid Search come in. In this article, we’ll share best practices and guidance to help teams build effective solutions using leading AI tools like MindsDB.

What are Knowledge Bases in MindsDB?

MindsDB’s Knowledge Bases turn your documents and datasets into AI-native indexes that can be queried using both:

  • Semantic Search: Understands meaning (via embeddings) to match queries like “overheating turbine incidents” or “grid compliance gaps.”

  • Metadata Filtering: Traditional SQL filters like region = 'Texas', severity > 3, or date BETWEEN.

  • Hybrid Search: Combines the two—so you can ask natural questions and control results with logic and precision.


Knowledge Bases and Hybrid Search in MindsDB brings together the best of AI understanding and SQL logic—giving you the power to query unstructured data with precision, context, and control that is grounded in your actual records, reports, and logs, not guesses.


Why It Matters for Energy & Utilities

Energy and utility companies face complex challenges:

  • Strict regulatory environments (EPA, ISO, state-level reporting)

  • Distributed infrastructure and asset-heavy field operations

  • Sustainability tracking (ESG, emissions, safety compliance)

  • Customer experience and service-level transparency


These challenges demand answers that are fast, accurate, and explainable—especially when decisions affect safety, compliance, or uptime. 


That’s why MindsDB’s hybrid search and AI-native Knowledge Bases can help energy and utility companies reduce investigation time, accelerate compliance reporting, and unlock real-time insights—all without moving or duplicating data.

MindsDB for Energy & Utilities


Real World Use Case: Indexing an Energy & Utilities Company’s Data with Knowledge Bases to Perform Hybrid Search

In the Energy & Utilities sector, data lives everywhere—buried in maintenance logs, scattered across compliance documents, and locked in technical reports. Extracting actionable insights from this unstructured data is often slow, manual, and error-prone. 


In this real-world use case, we’ll show how MindsDB’s Knowledge Bases and Hybrid Search make it possible to index and query this fragmented information using natural language and SQL. The result? Faster insights, proactive operations, and AI-ready infrastructure—without re-architecting your entire data stack.


Pre-requisites:

  1. Access MindsDB’s GUI via Docker locally or MindsDB’s extension on Docker Desktop.

  2. Configure your default models in the MindsDB GUI by navigating to Settings → Models.

  3. Add your data to MindsDB by creating a database connection or uploading your files.



Step 1: Create Knowledge Bases for Compliance documents, Field Maintenance Logs, ESG Report Gaps data.

Lets create multiple knowledge bases for each data source. 


We will start with the Compliance documents for the Energy & Utilities company. The data includes structured records of regulatory filings, with metadata such as:

  • doc_id, title, jurisdiction, regulation, risk_level, and

  • content: key clauses like “emission thresholds for gas-fired plants”


The CREATE KNOWLEDGE BASE syntax will be used:

CREATE KNOWLEDGE_BASE compliance_kb
USING
storage = pvec.compliance,
 metadata_columns = ['jurisdiction', 'regulation', 'department', 'risk_level', 'status'],
 content_columns  = ['title', 'content'],
 id_column        = 'doc_id';


Here are the parameters provided to the Knowledgebase:

  • compliance_kb: The name of the knowledgebase.

  • storage : The storage table where the embeddings of the knowledge base is stored.

  • metadata_columns : Here columns are provided as meta data columns to perform metadata filtering.

  • content_columns : Here columns are provided for semantic search

  • id_column  : Here a column is provided that uniquely identifies each source data row in the knowledge base. If not provided, it is generated from the hash of the content columns.


You can now insert the data into the Knowledge Base using the INSERT INTO syntax:

INSERT INTO compliance_kb
SELECT doc_id, title, content,jurisdiction,regulation,department,
risk_level, status
FROM files.compliance_docs;


Once the data is inserted, you can select the Knowledge base to see the embeddings stored:

SELECT * FROM compliance_kb;
MindsDB Knowledge Base


The same steps can be used for Field Maintenance Logs, ESG Report Gaps data.


Let’s continue by creating a Knowledge Base for the Field Maintenance Logs which tracks equipment issues, severity, and technician notes. Unstructured technician notes tied to:

  • ticket_id, location, equipment_type, severity, notes

  • Notes include entries like “recurring transformer failures due to overheating”

CREATE KNOWLEDGE_BASE maintenance_kb
USING
storage = pvec.maintenance,
 metadata_columns = ['location', 'equipment_type', 'technician', 'severity'],
 content_columns  = ['notes'],
 id_column        = 'ticket_id';


Insert the data into the Knowledge Base:

INSERT INTO maintenance_kb
SELECT ticket_id,notes,location,equipment_type,technician,
 severity, date_reported
FROM files.maintenance_logs;


Now the knowledge base can be queried:

SELECT * FROM maintenance_kb;
MindsDB Knowledge Base


Lastly, a knowledge base for the ESG Report Gaps can be created. This data highlights missing or incomplete compliance entries across departments.

CREATE KNOWLEDGE_BASE esg_report_gaps_kb
USING
storage = pvec.esg_report_gaps,
 metadata_columns = ['report_title', 'department', 'review_status', 'submitted_date'],
 content_columns  = ['content'],
 id_column        = 'report_id';


Insert the data into the Knowledge Base.

INSERT INTO esg_report_gaps_kb
SELECT report_id, report_title, department,content,review_status,
 submitted_date
FROM files.esg_report_gaps;


Query the knowledge base to see the embeddings stored into the Knowledge Base:

SELECT * FROM esg_report_gaps_kb;
MindsDB Knowledge Base


Step 2: Perform Hybrid Search Queries

You can query the knowledge bases using MindsDB’s Hybrid Search which will involve both semantic and keyword search. Let’s explore common problems an Energy & Utilities company experiences and how MindsDB can assist in obtaining information.


1. Regulatory Compliance Monitoring

Problem: Regulatory filings are dense, siloed, and hard to audit quickly. Lets surface regulatory risks and locate the specific filing or clause responsible.

-- Surface regulatory risks and locate the specific filing or clause responsible
SELECT *
FROM compliance_kb
WHERE
 content = 'emission thresholds for gas-fired plants'
 AND jurisdiction = 'California'
 AND risk_level = 'High'
 AND hybrid_search_alpha = 0.5;


Result: Instantly surface regulatory risks and locate the specific filing or clause responsible—without manual PDF searches. Here we can obtain the document id’s and titles.

MindsDB Hybrid Search


2. Field Maintenance & Equipment Logs

Problem: Technicians log issues in unstructured formats and finding trends is time-consuming. Patterns across regions, equipment types or failure causes can be identified.

-- Spot patterns across regions, equipment types, or failure causes
SELECT *
FROM maintenance_kb
WHERE
 content = 'recurring transformer failures due to overheating'
 AND location = 'West Texas'
 AND equipment_type = 'Substation'
 AND relevance >= 0.6
 AND hybrid_search_alpha = 0.5;


Result: Here we have spotted patterns across regions, equipment types, or failure causes—so field operations can act faster and with confidence.

MindsDB Hybrid Search


Now we can go further and try to identify root causes for this reoccurring problem. You can use hybrid search to correlate failure descriptions with regions, asset types, and severity levels.


Problem:Operations teams struggle to identify root causes across maintenance logs and inspection reports. Failures are logged in natural language, often inconsistently.

-- Find the root cause of reoccuring issues
SELECT *
FROM maintenance_kb
WHERE
 content = 'burned wires or overheating transformer'
 AND severity >= 4
 AND location = 'Midwest'
 AND relevance >= 0.65
 AND hybrid_search_alpha = 0.6;


Result:Teams can detect recurring failure types in specific locations and deploy preventative maintenance—reducing downtime and costly outages.

MindsDB Hybrid Search


3. ESG & Safety Reporting Gaps

Problem: ESG and EHS (Environment, Health & Safety) teams spend weeks compiling audit reports and identifying missing documentation for annual filings. You can pinpoint gaps or missing disclosures.

-- Flag incomplete or missing reports
SELECT *
FROM esg_report_gaps_kb
WHERE
 content = 'missing emissions report or incomplete incident log'
 AND department = 'Environmental Affairs'
 AND review_status = 'Pending'
 AND relevance >= 0.7;


Result: Accelerate ESG reporting cycles and ensure compliance teams flag incomplete or missing reports proactively.

MindsDB Hybrid Search


Step 3: Perform Cross JOIN Hybrid Search on Customer Complaints + Service SLA Alignment.

Customer service complaints and SLA agreements are stored separately. Teams can’t easily trace if SLA breaches are causing negative sentiment.


Solution:
Build two Knowledge Bases:

  • sla_docs_kb : SLA contracts, policy documents and support terms.

    • Includes: customer_id, document_type, status, content (e.g., "response time under 48 hours"), and effective_date

  • customer_feedback_kb : Call center notes, surveys, chat logs

    • Includes: customer_id, content, sentiment_score, and source


The same steps to creating a knowledge base can be created. In order to do a cross join, the id_column will be provided the same column parameter.


Start with the SLA agreement and policies Knowledge Base:

CREATE KNOWLEDGE_BASE sla_docs_kb
USING
storage = pvec.sla_docs,
 metadata_columns = ['doc_id', 'document_type', 'status', 'effective_date'],
 content_columns  = ['content'],
 id_column        = 'customer_id';


Insert the SLA data into the Knowledge Base:

INSERT INTO sla_docs_kb
SELECT
 customer_id, doc_id, status, content, document_type, effective_date
FROM files.sla_documents;


Select the data to make sure the information was embedded:

SELECT * FROM sla_docs_kb;
MindsDB Hybrid Search


Create the Knowledge Base for the Customer Feedback data:

CREATE KNOWLEDGE_BASE customer_feedback_kb
USING
storage = pvec.customer_feedback,
 metadata_columns = ['feedback_id', 'source', 'submitted_at', 'sentiment_score'],
 content_columns  = ['content'],
 id_column        = 'customer_id';


Insert the data:

INSERT INTO customer_feedback_kb
SELECT
 customer_id, feedback_id, source, content, submitted_at, sentiment_score
FROM files.customer_feedback;


Select the data:

SELECT * FROM customer_feedback_kb;
MindsDB Hybrid Search


Now we can run a cross JOIN Hybrid Search on the Knowledge Bases and try to identify the customers affected by SLA gaps:

-- Identify customers likely affected by SLA gaps
SELECT *
FROM customer_feedback_kb
JOIN sla_docs_kb
 ON customer_feedback_kb.id = sla_docs_kb.id
WHERE
 customer_feedback_kb.content = 'frequent outages or missed technician visits'
 AND sla_docs_kb.content = 'response time under 48 hours'
 AND customer_feedback_kb.relevance >= 0.5
 AND sla_docs_kb.relevance >= 0.9
 AND customer_feedback_kb.hybrid_search_alpha = 0.60
 AND sla_docs_kb.hybrid_search_alpha = 0.60;


Result: Here the customers are identified that are likely affected by SLA gaps and escalate before dissatisfaction leads to churn or complaints to regulators.

MindsDB Hybrid Search


It is also identified which SLA’s were not adhered to.

MindsDB Hybrid Search


Step 5: Create an Agent with multiple Knowledge Bases

You can unify all the Knowledge Bases you have created and query it with an Agent in natural language, which can help non-technical users like safety inspectors or compliance officers ask complex questions in plain language.


Create the agent using the CREATE AGENT statement:

CREATE AGENT energy_utilities_agent
USING
 data = {
   "knowledge_bases": ["mindsdb.compliance_kb", "mindsdb.maintenance_kb", "customer_feedback_kb", "sla_docs_kb", "esg_report_gaps_kb"]
 },
 prompt_template = '
   compliance_kb contains regulatory filings and policy clauses.
   maintenance_kb contains technician notes, locations, and severity data.
   customer_feedback_kb contains customer feedback.
   sla_docs_kb contains service level agreements and policy documents.
   esg_report_gaps_kb contains missing or incomplete compliance entries across departments.
   Answer user questions using facts grounded in those knowledge bases.
 ';


Here are the parameters provided to the CREATE AGENT syntax:

  • energy_utilities_agent: The name provided to the agent. 

  • data: This parameter stores data connected to the agent. Here we store the knowledge bases we created by providing their names in knowledge_bases

  • prompt_template: Here instructions are provided to the agent, with descriptions of the data sources listed in the knowledge bases.


We can ask the agent questions about field maintenance logs, ESG reports or customer feedback:

  1. Query the agent to see if there are any gaps in the ESG reports.

SELECT answer
FROM energy_utilities_agent
WHERE question = 'Are there any gaps in our ESG reports that need attention?';
MindsDB Agent


  1. Query the agent to see what is the most severe maintenance issues reported

SELECT answer
FROM energy_utilities_agent
WHERE question = 'What are the most severe maintenance issues reported?';
MindsDB Agent


  1. Query the agent to see if there is any correlation between compliance gaps and waste disposal.

SELECT answer
FROM energy_utilities_agent
WHERE question = 'Show compliance gaps related to waste disposal';
MindsDB Agent


  1. Query the agent to see what the general customer sentiment is with regards to the company’s services.

SELECT answer
FROM energy_utilities_agent
WHERE question = 'How do customers generally feel about our services based on feedback?';
MindsDB Agent


Why MindsDB for Energy & Utilities?

Whether you're modernizing field ops, enhancing regulatory oversight, or improving sustainability transparency, MindsDB gives energy and utilities teams the tools to make AI practical, secure, and valuable—right now.

  • Secure, enterprise-ready architecture (on-prem or VPC deployment)

  • Real-time answers without moving or duplicating data

  • Trusted, explainable AI grounded in your actual records

  • Works with your data formats: PDFs, tables, logs, text fields, and more

MindsDB


Conclusion

MindsDB’s Knowledge Bases and Hybrid Search empower energy and utilities organizations to break down data silos, reduce response time, and ensure compliance—all while enhancing decision-making across teams. Whether it’s a field engineer investigating equipment anomalies or an ESG team preparing reports, MindsDB enables fast, trusted access to the right information—exactly when it’s needed. In an industry where safety, compliance, and uptime are mission-critical, having a searchable layer of intelligence over your data is no longer a nice-to-have—it’s essential.


Let us show you how to connect your compliance logs, maintenance records, and operational reports to AI—with no ETL pipelines and no extra infrastructure. Contact the MindsDB team to get started.

Energy and utilities companies are generating more data than ever—across regulatory filings, field operations, ESG reports, equipment logs, safety audits, and customer service tickets. Yet, this data is often stored in silos: compliance data lives in PDFs, maintenance logs in internal portals, and customer feedback in helpdesk tools. From data engineers to analysts and software developers, teams are tasked with transforming this data into actionable insights that guide leadership’s most important decisions.


To unlock value, teams need a way to search, correlate, and act on this unstructured and structured data—securely, in real time.


That’s where MindsDB Knowledge Bases and Hybrid Search come in. In this article, we’ll share best practices and guidance to help teams build effective solutions using leading AI tools like MindsDB.

What are Knowledge Bases in MindsDB?

MindsDB’s Knowledge Bases turn your documents and datasets into AI-native indexes that can be queried using both:

  • Semantic Search: Understands meaning (via embeddings) to match queries like “overheating turbine incidents” or “grid compliance gaps.”

  • Metadata Filtering: Traditional SQL filters like region = 'Texas', severity > 3, or date BETWEEN.

  • Hybrid Search: Combines the two—so you can ask natural questions and control results with logic and precision.


Knowledge Bases and Hybrid Search in MindsDB brings together the best of AI understanding and SQL logic—giving you the power to query unstructured data with precision, context, and control that is grounded in your actual records, reports, and logs, not guesses.


Why It Matters for Energy & Utilities

Energy and utility companies face complex challenges:

  • Strict regulatory environments (EPA, ISO, state-level reporting)

  • Distributed infrastructure and asset-heavy field operations

  • Sustainability tracking (ESG, emissions, safety compliance)

  • Customer experience and service-level transparency


These challenges demand answers that are fast, accurate, and explainable—especially when decisions affect safety, compliance, or uptime. 


That’s why MindsDB’s hybrid search and AI-native Knowledge Bases can help energy and utility companies reduce investigation time, accelerate compliance reporting, and unlock real-time insights—all without moving or duplicating data.

MindsDB for Energy & Utilities


Real World Use Case: Indexing an Energy & Utilities Company’s Data with Knowledge Bases to Perform Hybrid Search

In the Energy & Utilities sector, data lives everywhere—buried in maintenance logs, scattered across compliance documents, and locked in technical reports. Extracting actionable insights from this unstructured data is often slow, manual, and error-prone. 


In this real-world use case, we’ll show how MindsDB’s Knowledge Bases and Hybrid Search make it possible to index and query this fragmented information using natural language and SQL. The result? Faster insights, proactive operations, and AI-ready infrastructure—without re-architecting your entire data stack.


Pre-requisites:

  1. Access MindsDB’s GUI via Docker locally or MindsDB’s extension on Docker Desktop.

  2. Configure your default models in the MindsDB GUI by navigating to Settings → Models.

  3. Add your data to MindsDB by creating a database connection or uploading your files.



Step 1: Create Knowledge Bases for Compliance documents, Field Maintenance Logs, ESG Report Gaps data.

Lets create multiple knowledge bases for each data source. 


We will start with the Compliance documents for the Energy & Utilities company. The data includes structured records of regulatory filings, with metadata such as:

  • doc_id, title, jurisdiction, regulation, risk_level, and

  • content: key clauses like “emission thresholds for gas-fired plants”


The CREATE KNOWLEDGE BASE syntax will be used:

CREATE KNOWLEDGE_BASE compliance_kb
USING
storage = pvec.compliance,
 metadata_columns = ['jurisdiction', 'regulation', 'department', 'risk_level', 'status'],
 content_columns  = ['title', 'content'],
 id_column        = 'doc_id';


Here are the parameters provided to the Knowledgebase:

  • compliance_kb: The name of the knowledgebase.

  • storage : The storage table where the embeddings of the knowledge base is stored.

  • metadata_columns : Here columns are provided as meta data columns to perform metadata filtering.

  • content_columns : Here columns are provided for semantic search

  • id_column  : Here a column is provided that uniquely identifies each source data row in the knowledge base. If not provided, it is generated from the hash of the content columns.


You can now insert the data into the Knowledge Base using the INSERT INTO syntax:

INSERT INTO compliance_kb
SELECT doc_id, title, content,jurisdiction,regulation,department,
risk_level, status
FROM files.compliance_docs;


Once the data is inserted, you can select the Knowledge base to see the embeddings stored:

SELECT * FROM compliance_kb;
MindsDB Knowledge Base


The same steps can be used for Field Maintenance Logs, ESG Report Gaps data.


Let’s continue by creating a Knowledge Base for the Field Maintenance Logs which tracks equipment issues, severity, and technician notes. Unstructured technician notes tied to:

  • ticket_id, location, equipment_type, severity, notes

  • Notes include entries like “recurring transformer failures due to overheating”

CREATE KNOWLEDGE_BASE maintenance_kb
USING
storage = pvec.maintenance,
 metadata_columns = ['location', 'equipment_type', 'technician', 'severity'],
 content_columns  = ['notes'],
 id_column        = 'ticket_id';


Insert the data into the Knowledge Base:

INSERT INTO maintenance_kb
SELECT ticket_id,notes,location,equipment_type,technician,
 severity, date_reported
FROM files.maintenance_logs;


Now the knowledge base can be queried:

SELECT * FROM maintenance_kb;
MindsDB Knowledge Base


Lastly, a knowledge base for the ESG Report Gaps can be created. This data highlights missing or incomplete compliance entries across departments.

CREATE KNOWLEDGE_BASE esg_report_gaps_kb
USING
storage = pvec.esg_report_gaps,
 metadata_columns = ['report_title', 'department', 'review_status', 'submitted_date'],
 content_columns  = ['content'],
 id_column        = 'report_id';


Insert the data into the Knowledge Base.

INSERT INTO esg_report_gaps_kb
SELECT report_id, report_title, department,content,review_status,
 submitted_date
FROM files.esg_report_gaps;


Query the knowledge base to see the embeddings stored into the Knowledge Base:

SELECT * FROM esg_report_gaps_kb;
MindsDB Knowledge Base


Step 2: Perform Hybrid Search Queries

You can query the knowledge bases using MindsDB’s Hybrid Search which will involve both semantic and keyword search. Let’s explore common problems an Energy & Utilities company experiences and how MindsDB can assist in obtaining information.


1. Regulatory Compliance Monitoring

Problem: Regulatory filings are dense, siloed, and hard to audit quickly. Lets surface regulatory risks and locate the specific filing or clause responsible.

-- Surface regulatory risks and locate the specific filing or clause responsible
SELECT *
FROM compliance_kb
WHERE
 content = 'emission thresholds for gas-fired plants'
 AND jurisdiction = 'California'
 AND risk_level = 'High'
 AND hybrid_search_alpha = 0.5;


Result: Instantly surface regulatory risks and locate the specific filing or clause responsible—without manual PDF searches. Here we can obtain the document id’s and titles.

MindsDB Hybrid Search


2. Field Maintenance & Equipment Logs

Problem: Technicians log issues in unstructured formats and finding trends is time-consuming. Patterns across regions, equipment types or failure causes can be identified.

-- Spot patterns across regions, equipment types, or failure causes
SELECT *
FROM maintenance_kb
WHERE
 content = 'recurring transformer failures due to overheating'
 AND location = 'West Texas'
 AND equipment_type = 'Substation'
 AND relevance >= 0.6
 AND hybrid_search_alpha = 0.5;


Result: Here we have spotted patterns across regions, equipment types, or failure causes—so field operations can act faster and with confidence.

MindsDB Hybrid Search


Now we can go further and try to identify root causes for this reoccurring problem. You can use hybrid search to correlate failure descriptions with regions, asset types, and severity levels.


Problem:Operations teams struggle to identify root causes across maintenance logs and inspection reports. Failures are logged in natural language, often inconsistently.

-- Find the root cause of reoccuring issues
SELECT *
FROM maintenance_kb
WHERE
 content = 'burned wires or overheating transformer'
 AND severity >= 4
 AND location = 'Midwest'
 AND relevance >= 0.65
 AND hybrid_search_alpha = 0.6;


Result:Teams can detect recurring failure types in specific locations and deploy preventative maintenance—reducing downtime and costly outages.

MindsDB Hybrid Search


3. ESG & Safety Reporting Gaps

Problem: ESG and EHS (Environment, Health & Safety) teams spend weeks compiling audit reports and identifying missing documentation for annual filings. You can pinpoint gaps or missing disclosures.

-- Flag incomplete or missing reports
SELECT *
FROM esg_report_gaps_kb
WHERE
 content = 'missing emissions report or incomplete incident log'
 AND department = 'Environmental Affairs'
 AND review_status = 'Pending'
 AND relevance >= 0.7;


Result: Accelerate ESG reporting cycles and ensure compliance teams flag incomplete or missing reports proactively.

MindsDB Hybrid Search


Step 3: Perform Cross JOIN Hybrid Search on Customer Complaints + Service SLA Alignment.

Customer service complaints and SLA agreements are stored separately. Teams can’t easily trace if SLA breaches are causing negative sentiment.


Solution:
Build two Knowledge Bases:

  • sla_docs_kb : SLA contracts, policy documents and support terms.

    • Includes: customer_id, document_type, status, content (e.g., "response time under 48 hours"), and effective_date

  • customer_feedback_kb : Call center notes, surveys, chat logs

    • Includes: customer_id, content, sentiment_score, and source


The same steps to creating a knowledge base can be created. In order to do a cross join, the id_column will be provided the same column parameter.


Start with the SLA agreement and policies Knowledge Base:

CREATE KNOWLEDGE_BASE sla_docs_kb
USING
storage = pvec.sla_docs,
 metadata_columns = ['doc_id', 'document_type', 'status', 'effective_date'],
 content_columns  = ['content'],
 id_column        = 'customer_id';


Insert the SLA data into the Knowledge Base:

INSERT INTO sla_docs_kb
SELECT
 customer_id, doc_id, status, content, document_type, effective_date
FROM files.sla_documents;


Select the data to make sure the information was embedded:

SELECT * FROM sla_docs_kb;
MindsDB Hybrid Search


Create the Knowledge Base for the Customer Feedback data:

CREATE KNOWLEDGE_BASE customer_feedback_kb
USING
storage = pvec.customer_feedback,
 metadata_columns = ['feedback_id', 'source', 'submitted_at', 'sentiment_score'],
 content_columns  = ['content'],
 id_column        = 'customer_id';


Insert the data:

INSERT INTO customer_feedback_kb
SELECT
 customer_id, feedback_id, source, content, submitted_at, sentiment_score
FROM files.customer_feedback;


Select the data:

SELECT * FROM customer_feedback_kb;
MindsDB Hybrid Search


Now we can run a cross JOIN Hybrid Search on the Knowledge Bases and try to identify the customers affected by SLA gaps:

-- Identify customers likely affected by SLA gaps
SELECT *
FROM customer_feedback_kb
JOIN sla_docs_kb
 ON customer_feedback_kb.id = sla_docs_kb.id
WHERE
 customer_feedback_kb.content = 'frequent outages or missed technician visits'
 AND sla_docs_kb.content = 'response time under 48 hours'
 AND customer_feedback_kb.relevance >= 0.5
 AND sla_docs_kb.relevance >= 0.9
 AND customer_feedback_kb.hybrid_search_alpha = 0.60
 AND sla_docs_kb.hybrid_search_alpha = 0.60;


Result: Here the customers are identified that are likely affected by SLA gaps and escalate before dissatisfaction leads to churn or complaints to regulators.

MindsDB Hybrid Search


It is also identified which SLA’s were not adhered to.

MindsDB Hybrid Search


Step 5: Create an Agent with multiple Knowledge Bases

You can unify all the Knowledge Bases you have created and query it with an Agent in natural language, which can help non-technical users like safety inspectors or compliance officers ask complex questions in plain language.


Create the agent using the CREATE AGENT statement:

CREATE AGENT energy_utilities_agent
USING
 data = {
   "knowledge_bases": ["mindsdb.compliance_kb", "mindsdb.maintenance_kb", "customer_feedback_kb", "sla_docs_kb", "esg_report_gaps_kb"]
 },
 prompt_template = '
   compliance_kb contains regulatory filings and policy clauses.
   maintenance_kb contains technician notes, locations, and severity data.
   customer_feedback_kb contains customer feedback.
   sla_docs_kb contains service level agreements and policy documents.
   esg_report_gaps_kb contains missing or incomplete compliance entries across departments.
   Answer user questions using facts grounded in those knowledge bases.
 ';


Here are the parameters provided to the CREATE AGENT syntax:

  • energy_utilities_agent: The name provided to the agent. 

  • data: This parameter stores data connected to the agent. Here we store the knowledge bases we created by providing their names in knowledge_bases

  • prompt_template: Here instructions are provided to the agent, with descriptions of the data sources listed in the knowledge bases.


We can ask the agent questions about field maintenance logs, ESG reports or customer feedback:

  1. Query the agent to see if there are any gaps in the ESG reports.

SELECT answer
FROM energy_utilities_agent
WHERE question = 'Are there any gaps in our ESG reports that need attention?';
MindsDB Agent


  1. Query the agent to see what is the most severe maintenance issues reported

SELECT answer
FROM energy_utilities_agent
WHERE question = 'What are the most severe maintenance issues reported?';
MindsDB Agent


  1. Query the agent to see if there is any correlation between compliance gaps and waste disposal.

SELECT answer
FROM energy_utilities_agent
WHERE question = 'Show compliance gaps related to waste disposal';
MindsDB Agent


  1. Query the agent to see what the general customer sentiment is with regards to the company’s services.

SELECT answer
FROM energy_utilities_agent
WHERE question = 'How do customers generally feel about our services based on feedback?';
MindsDB Agent


Why MindsDB for Energy & Utilities?

Whether you're modernizing field ops, enhancing regulatory oversight, or improving sustainability transparency, MindsDB gives energy and utilities teams the tools to make AI practical, secure, and valuable—right now.

  • Secure, enterprise-ready architecture (on-prem or VPC deployment)

  • Real-time answers without moving or duplicating data

  • Trusted, explainable AI grounded in your actual records

  • Works with your data formats: PDFs, tables, logs, text fields, and more

MindsDB


Conclusion

MindsDB’s Knowledge Bases and Hybrid Search empower energy and utilities organizations to break down data silos, reduce response time, and ensure compliance—all while enhancing decision-making across teams. Whether it’s a field engineer investigating equipment anomalies or an ESG team preparing reports, MindsDB enables fast, trusted access to the right information—exactly when it’s needed. In an industry where safety, compliance, and uptime are mission-critical, having a searchable layer of intelligence over your data is no longer a nice-to-have—it’s essential.


Let us show you how to connect your compliance logs, maintenance records, and operational reports to AI—with no ETL pipelines and no extra infrastructure. Contact the MindsDB team to get started.

Start Building with MindsDB Today

Power your AI strategy with the leading AI data solution.

© 2025 All rights reserved by MindsDB.

Start Building with MindsDB Today

Power your AI strategy with the leading AI data solution.

© 2025 All rights reserved by MindsDB.

Start Building with MindsDB Today

Power your AI strategy with the leading AI data solution.

© 2025 All rights reserved by MindsDB.

Start Building with MindsDB Today

Power your AI strategy with the leading AI data solution.

© 2025 All rights reserved by MindsDB.