Back to all projects
CASE 01 · Applied AI · NLP / RAG · AKCIT-UFG Capstone

RAG-Powered Customer Support Agent for the Free Energy Market

Domain-grounded conversational AI translating complex Brazilian electricity regulations, tariff rules, and commercial onboarding questions into accurate, traceable answers.

Role
AI / NLP Developer (Postgraduate Capstone)
Domain
Energy & Utilities · Generative AI
Year
2025
Python LLMs RAG Architecture Embeddings Vector Store Prompt Engineering NLP
QUERY ACL User VECTOR STORE Energy Docs RETRIEVAL Top-K Context GROUNDED LLM Guardrails OUTPUT Cited Reply

01. Context & Problem

Brazil’s Free Energy Market (Ambiente de Contratação Livre — ACL) involves dense regulatory rules, eligibility criteria, billing structures, and migration procedures. Prospective and existing customers frequently ask recurring yet high-stakes questions where generic LLM hallucinations are unacceptable.

  • Customer support teams spent disproportionate time answering repetitive regulatory and contractual questions scattered across manuals and PDFs.
  • Standard out-of-the-box LLMs lacked up-to-date domain specificity for Brazilian energy regulations and risked inventing tariff or migration rules.
  • Responses needed to stay concise, auditable against source documents, and gracefully escalate out-of-scope inquiries.

02. System Architecture & Approach

Designed a Retrieval-Augmented Generation (RAG) assistant that decouples domain knowledge ingestion from conversational synthesis, enforcing grounded responses backed by semantic retrieval over curated energy-sector documentation.

01

Document Ingestion & Semantic Chunking

Parsed structured energy-market guides and FAQ material into context-preserving chunks with section metadata to avoid cutting regulatory definitions mid-rule.

02

Dense Embedding & Vector Indexing

Indexed domain chunks in a vector database enabling fast semantic lookup even when customers phrase questions in informal business language rather than regulatory jargon.

03

Grounded Prompting & Guardrails

Constructed strict system prompts instructing the LLM to synthesize exclusively from retrieved evidence, cite relevant context, and decline unsupported claims.

04

Conversational Interface & Evaluation

Tested across realistic customer scenarios (migration eligibility, captive vs. free billing, contract terms) to tune chunk size, top-k retrieval, and answer tone.

03. Engineering Decisions & Trade-offs

RAG over Fine-Tuning

Energy-market rules and commercial offers evolve frequently; updating an indexed knowledge base is far cheaper, faster, and more auditable than retraining model weights.

Precision-First Guardrails

In regulated utilities, saying "I don’t have enough information — let me connect you to a specialist" is strictly better than sounding confident with an inaccurate answer.

04. Outcomes & Key Takeaways

  • Delivered as the capstone project for the Postgraduate Specialization in NLP at AKCIT-UFG (EMBRAPII).
  • Demonstrated how domain expertise in Energy & Utilities directly amplifies LLM reliability through better chunking, evaluation criteria, and guardrail design.
  • Established a reusable architectural pattern directly aligned with production enterprise agent systems.