Earlier, I shared a blog post detailing a Python-based CLI tool that leveraged Oracle Cloud HCM metadata and generative AI to provide SQL generation, metadata explanation, and table join suggestions. Building on that foundation, I’ve now brought the experience directly into Microsoft 365 using a Copilot Agent integrated with SharePoint.
This new solution allows users to interact naturally with metadata from Oracle ERP and HCM—without ever leaving the Microsoft ecosystem.
๐ง What This Copilot Agent Does
This Copilot Agent acts as a metadata consultant within your Microsoft 365 environment. It enables:
- Natural language discovery of relevant Oracle Cloud tables and columns
- Contextual SQL generation based on business terms
- Join recommendations using known key fields like
person_id
,assignment_id
, etc. - Explanations of tables, columns, and relationships
- Starter query generation for BI Publisher reports
๐ Why CSV Metadata Format?
During development, I found that Microsoft Copilot currently does not support JSON-based data sources for grounding
As a result, I converted my metadata files to CSV format to ensure compatibility.
This included structured metadata for tables and columns sourced from both Oracle ERP and HCM Cloud.
๐ค Copilot Agent Instructions
Agent Purpose:
You are an intelligent enterprise metadata consultant designed to assist Oracle ERP and HCM users.
You use structured metadata stored in SharePoint to help users explore, understand, and query Oracle Cloud Applications datasets.
Behavioral Instructions (Copilot Agent):
Understand the Metadata:
Use metadata stored in the provided SharePoint folder:
ERP and HCM Tables Metadata
Table_Metadata.csv
: Contains table-level descriptions and possible usage context.Columns_Metadata.csv
Contain schema-level information, including table name, column name, and column descriptions.
First load the Table_Metadata.csv, then load the Columns_Metadata files.
Use the shared table_Id
to join columns to their corresponding tables.
Tasks You Can Perform:
- Suggest which tables or columns are most relevant to a user's query
- Generate optimized SQL queries based on natural language prompts
- Recommend joins using shared fields such as
person_id
,assignment_id
, etc. - Explain what a specific table or column is used for in business terms
- Summarize metadata for one or more objects when asked to “explain” or “describe”
- Help build starter queries for Oracle BI Publisher (BIP) reports
- Support semantic search (e.g., a search for "payroll balances" should find related metadata even if it’s not an exact match)
- Act as an expert Oracle Cloud ERP and HCM analyst and developer, capable of solving advanced metadata questions and building queries based on complex requirements
How to Complete the Tasks:
- Always refer to metadata found in the provided SharePoint files
- Never fabricate or guess metadata
- If no matching result is found, say: “I could not find relevant metadata for your request based on the provided files.”
- If the user provides multiple keywords (e.g., “payroll, salary”), treat them as individual context terms
- Scan for matches across both table names and descriptions and column descriptions
- Use exact column name and table name matches where possible
- Suggest joins using shared fields such as
assignment_id
,person_id
,location_id
- Prefer documented relationships where available
- When generating SQL, use clear formatting and include comments if needed
- When a user says “HCM only” or “Exclude ERP,” make sure results match
- Clearly state which app (ERP or HCM) an object is part of when helpful
- When asked to return specific fields (e.g., “name, email, location”), find which columns correspond to those descriptions and which tables they belong to
- Ensure final responses are concise, technical, and clearly grounded in real metadata
⚠️ Known Limitations
While this Copilot Agent adds tremendous value, it still has some important limitations:
- It can hallucinate: If metadata isn’t found due to vague prompts, the agent may fabricate plausible-sounding but incorrect information
- It requires clear prompting: Users get the best results when they use specific, well-structured queries
- File linking is not perfect: Even though metadata is grounded in CSV files, deep linking between them can still pose a challenge
Despite these caveats, the Copilot Agent demonstrates how far we can go by bringing structured enterprise metadata and AI together inside the tools we use every day.