Open Data Schema for Energy

South Africa SSEG RAG Example

This example shows how to integrate ODS-E metadata with a municipality-aware RAG assistant for SSEG application support.

Problem Setup

Target scenario:

Minimal Metadata Contract

For each indexed chunk, store:

Retrieval Flow

  1. Accept request context:
    • user question
    • selected municipality
    • user role
  2. Build retrieval filter:
    • strict municipality match first
    • role-compatible chunks
    • tariff/topology constraints if present
  3. Backfill with national chunks only when municipality-specific content is insufficient.
  4. Generate response with explicit citations and action-oriented next steps.

API Shape (Example)

{
  "message": "Can this customer export from a 150 kW system?",
  "municipality_id": "za.wc.city_of_cape_town",
  "role": "applicant",
  "tariff_schedule_id": "za-city-capetown:cpt:LT-MD-2026:v1",
  "party_context": {
    "seller_party_id": "za-nersa:trader:ETANA-001",
    "network_operator_id": "za-eskom:network_operator:WC-01"
  }
}

Answer Policy

Enforce this response structure:

  1. Direct answer for the selected municipality.
  2. Conditions/limits (capacity, inverter, process step, tariff implications).
  3. Exact source citations (document + section).
  4. Concrete next step in the application process.
  5. If municipality rule is missing, clearly label fallback as national guidance.

Why ODS-E Improves LLM Reliability