Search This Blog

Showing posts with label Agents. Show all posts
Showing posts with label Agents. Show all posts

Monday, July 7, 2025

Introducing My Microsoft Copilot Agent for Oracle ERP & HCM Metadata

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.

Saturday, June 21, 2025

Leveraging Oracle Cloud’s Generative AI with Cohere: A Hands-On Approach

After days of tinkering and fine-tuning, I'm excited to share something I’ve been working on — OCI Generative AI Cohere Integration with external services. If you're someone who works with AI, Oracle Cloud, or just enjoys diving into new tech, this project might be something you'll find interesting.

What's the Project About?

In short, it's a simple yet powerful integration of Oracle Cloud’s Generative AI service with Cohere's language model by exposing it to external usage in order not to be confined to the chat experience within the OCI console. The goal is to provide an easy-to-use interface for AI-driven responses via a Flask API or function-based approach. Whether you're running the service locally or integrating it into your own applications, this project is meant to be a starting point for building smarter, AI-powered experiences that allow you the flexibility of using your preferred development platform outside of the playground in your Oracle OCI Tenancy.

Why This Project?

If you’re like me, you enjoy playing with new tools but don’t always want to reinvent the wheel every time you build something. That’s why I wanted to simplify integrating Oracle's powerful AI services into everyday applications. The project takes the heavy lifting out of the process and provides a clean, easy-to-use API for interacting with Oracle’s AI models.

But it doesn’t stop there. Whether you're building out something bigger or just playing around with ideas, this project is designed to be flexible and easily extendable.

Here’s What You Get:

  • Flask API: If you’re building a web-based application and want easy interaction with the Generative AI service, the Flask API is ready to go. You can send requests, get responses, and scale up as needed.
  • Function-based API: For those who don’t need a full web API, you can call the AI service directly from a function that you can import into your Python projects. Perfect for smaller integrations or experimenting within your own apps.
  • Configuration Flexibility: With environment variables and a configuration file, you have full control over things like model parameters and Oracle Cloud credentials.

How to Use It?

  1. Set up your environment: Whether you're using the Flask API or the function-based setup, you’ll need to configure your environment with Oracle Cloud credentials and some basic settings.
  2. Get running: Once configured, you can easily call the API or function with any message you want to send to the AI model, and you’ll get a detailed response in return.

I’ve added full instructions on the project’s GitHub page, including setup steps, environment variables, and how to run both approaches.

What’s Next?

The goal is to keep expanding this project. Right now, it’s all about integration, but as AI services evolve, I want to keep adding new features and I likely will build apps that consume these interfacing endpoints in order to use the power of the Cohere LLM. Expect more updates on this as I add new functionality and more tutorials to help everyone get the most out of the platform.

Feel free to dive into the project, contribute, or just ask questions. I’m always happy to connect with fellow developers who are exploring AI and Oracle Cloud.

Check it out on GitHub: OCI Generative AICohere Integration

I've added some screenshots below showing the interactions with the OCI Gen AI service via Postman by utilizing the Flask API, allowing extensibility outside of the chat experience in OCI which is the default experience. 

By utilizing the API approach you can take advantage of the power of the Cohere LLM through Oracle OCI in your applications and data science tools while maintaining your security assurances of being inside of your OCI tenancy.

Thanks for reading, and happy coding!

OCI Gen AI Playground

Click on the images to expand them for ease of viewing


Postman Interaction with Flask API Exposing the OCI Gen AI Chat Service


OCI Gen AI Traffic from the API



Friday, March 28, 2025

How to Create and Manage a Microsoft Teams Copilot Agent

Creating and managing a Teams Copilot Agent can significantly enhance your team's productivity and streamline various tasks. In this blog post, we'll walk you through the steps to set up and configure your agent, along with some useful tips to optimize its performance.

Pre-requisites

Before you start, ensure you have access to Copilot in Teams. You may need to be part of the ACL Group that manages access to the agent. Additionally, users in this group must have access to the SharePoint folder where the source data is located.

Step-by-Step Guide

1. Navigate to Copilot in Teams

In Teams, go to the Copilot section under "Chats."

2. Create an Agent

Click on "Create an Agent" and then select "Configure."



3. Select a Template

You can choose a template that will auto-populate instructions and other fields. These instructions essentially define the persona your agent will assume.

Tip: Pick a template of the kind of agent you want, then place the instructions template in ChatGPT or Copilot or OCI Gen AI and ask it to create a persona based on a given context of your choosing.

4. Point the Agent at Source Data

In the "Knowledge" section, point the agent at the source data. Place the files that will serve as the content for the agent in SharePoint or Teams. You can add up to 20 sources in SharePoint.

Tip: Avoid versioning files; store the latest version of the document. Organize the content and folders the agent is pointing to for higher accuracy.



5. Configure Agent Capabilities

If you want to build an agent that generates images or writes code exclusively, check the respective boxes. For a general-purpose conversational agent, leave these boxes unchecked.

6. Set Starter Prompts

These are prompts users will see when they start a conversation with the agent. You can hardcode common prompts to get users started.



7. Create the Agent

Once all the information is filled out, hit "Create" (top right).

8. Set Access Controls

Enter the ACLs to expose the agent to specific users. Copy the link to the agent and share it with the people who will access it (they also need to have Copilot).

Tip: Individual users may not work depending on your company policies; only ACL groups.

Editing an Agent

To edit an agent, go back to "Create an Agent," click on "View all agents," and navigate to the one you want to edit. You can change the instructions or access settings as needed.

If you are using Microsoft Teams, you can create very useful Agents on top of your existing data and make research, discovery and troubleshooting more engaging, it is a great way to assist new employees or help enhance productivity in general!