AI Setup Guide

Build an Oracle HCM AI Assistant with Claude

Generic AI fails at Oracle HCM because it doesn't know the schema. Here's how to load the right context — and the exact system prompt that makes Claude handle HDL errors, OTBI queries, and Fast Formula like a senior consultant.

Jun 6, 2026·14 min read·Search 35K+ Tables →

Table of Contents

  1. Why Generic AI Fails at Oracle HCM
  2. What Context to Load (And What to Skip)
  3. Claude Project Setup — Step by Step
  4. The System Prompt Structure That Works
  5. HDL Error Prompts That Get Results
  6. OTBI Query Prompts That Work First Time
  7. Fast Formula Debugging Prompts
  8. ChatGPT vs Claude for Oracle HCM Work
  9. What NOT to Ask Your AI Assistant

1. Why Generic AI Fails at Oracle HCM

Ask ChatGPT or Claude cold: "Write me a SQL query to get current headcount by department in Oracle HCM."

You'll get something that looks right. You'll run it. It will either fail or return 5–20 rows per employee. Here's why:

The model isn't the problem. Context is the problem. Oracle Fusion HCM has 14,950 tables and 1.2 million columns — a body of knowledge no general-purpose AI has seen deeply enough. Load that context, and the same Claude model that gave you wrong answers becomes a useful senior consultant.

ℹ️

The unlock: Oracle HCM has enough documentation, error patterns, and SQL conventions that a well-structured system prompt covers 80–90% of daily consultant tasks. You don't need a fine-tuned model. You need the right context window.

2. What Context to Load — And What to Skip

You cannot load Oracle's full schema documentation into a context window. You don't need to. The 20% of Oracle HCM knowledge that solves 80% of consultant problems is:

Context CategoryWhat to IncludeSkip
Table cheat sheetTop 15 tables per module with their primary key and date-effective filter patternAll 14,950 tables — context overflow, noise
HDL error codesTop 20 error names, their common causes, and the verification SQL query for eachFull HDL API documentation — too dense, rarely needed
OTBI rulesLogical SQL syntax differences, subject area names, common errors and fixesFull OTBI administrator guide — not relevant to query writers
Fast Formula patternsWorking template for each formula type (payroll, absence, benefits) with common function signaturesFull Fast Formula Language Reference — too long
Date-effective rulesThe 3 date filter patterns that prevent duplicate rows in every common joinAll 30+ date filter variants — creates ambiguity

This fits in a Claude Project system prompt (~3,000 tokens). It's enough to handle HDL debugging, OTBI query generation, Fast Formula issues, and compliance SQL — the daily work of an Oracle HCM consultant or HRIS analyst.

3. Claude Project Setup — Step by Step

Claude Projects (available in Claude Pro and Claude for Teams) let you store a persistent system prompt and files that persist across conversations. This is the right setup for Oracle HCM work — you set it up once and every conversation has the context loaded automatically.

1

Create a New Claude Project

In Claude.ai, click "Projects" in the left sidebar → "New Project." Name it "Oracle HCM Assistant" or similar. You can create multiple projects for different modules (e.g., "Payroll Oracle HCM" separate from "Benefits Oracle HCM").

2

Add the System Prompt

In the project settings, find "Custom Instructions" or "Project Instructions." Paste in your Oracle HCM system prompt here. This text is injected automatically into every conversation in this project. See the prompt structure below.

3

Upload Reference Files (Optional but Powerful)

You can upload files to the project that Claude can search. Good candidates: your organization's lookup code reference spreadsheet, your custom element list, the specific OTBI subject area columns for your implementation, and any HDL error logs from recent failed loads.

4

Test with 3 Real Scenarios

Before using in production: paste a real HDL error log and verify the root cause is accurate. Ask for a headcount query and verify the table names are current (should use PER_ALL_ASSIGNMENTS_M, not _F). Submit an OTBI question and check that the Logical SQL syntax is correct.

⚠️

Data sensitivity: Do not paste real employee data (names, person numbers, SSNs) into Claude or any external AI. Use dummy person numbers during testing. Oracle HCM data is PII — keep it on-prem or in Oracle's tenancy.

4. The System Prompt Structure That Works

Here's the framework for an effective Oracle HCM system prompt. Each section has a specific purpose — don't skip sections, but keep each one tight.

Oracle HCM System Prompt — Core Structure
## Identity
You are an Oracle Fusion Cloud HCM specialist. You know:
- The HCM data model (key tables, date-effective join patterns)
- HDL error diagnosis (error codes → root causes → verification SQL)
- OTBI Logical SQL (not standard SQL — different syntax, different rules)
- Fast Formula (payroll, absence, benefits formula types)

If you are uncertain about a table or column name, say so.
Do NOT hallucinate Oracle schema.

## Critical Rules (Always Apply)
1. ASSIGNMENTS: Use PER_ALL_ASSIGNMENTS_M (not _F — deprecated 24B).
   Filter: EFFECTIVE_LATEST_CHANGE = 'Y'
2. DATE-EFFECTIVE TABLES (_F suffix): Always filter:
   TRUNC(SYSDATE) BETWEEN EFFECTIVE_START_DATE AND EFFECTIVE_END_DATE
3. OTBI LOGICAL SQL: Column paths use quoted subject area format.
   NOT: FROM PER_ALL_ASSIGNMENTS_M
   YES: FROM "Workforce Management - Worker Assignment Real Time"
4. HDL ERRORS: Check HRC_INTEGRATION_RUNS → HRC_INTEGRATION_ERRORS →
   HRC_INTEGRATION_ERROR_MESSAGES in that order.

## Key Tables Quick Reference
[paste your table cheat sheet here — 15-20 rows max]

## HDL Error Code Library
[paste top 10-20 HDL errors with root cause + verification SQL]

## OTBI Subject Areas
[paste subject area name → use case mapping]

## Response Format
1. Show SQL/code first, then explain
2. For HDL: show verification query before suggesting fix
3. For OTBI: state which subject area the query targets
4. Flag deprecated tables/approaches
5. State assumptions explicitly (LDG, business group, country)

The full version of this prompt — with complete table cheat sheets, all 20 HDL error codes, subject area mapping, Fast Formula templates, and response format rules — is available as a ready-to-paste document. See the link below.

Get the Complete Oracle HCM System Prompt

The full system prompt includes: 15-table cheat sheet, 20 HDL error codes with verification SQL, OTBI subject area guide, Fast Formula templates for payroll/absence/benefits, and response format rules. Copy-paste into Claude Projects or ChatGPT Custom Instructions.

Get the System Prompt →

5. HDL Error Prompts That Get Results

The single highest-ROI use case for an Oracle HCM AI assistant is HDL error debugging. A support call for an HDL failure runs 2–5 days on average. A well-prompted AI can reduce this to 15 minutes for common errors.

The key: Don't just paste the error message. Paste the output from the 3-table debug chain.

Step 1: Pull the Error Context (Run This First)
SELECT
    hir.INTEGRATION_RUN_ID,
    hie.BUSINESS_OBJECT,
    hiem.MESSAGE_NAME,
    hiem.ATTRIBUTE_NAME,
    hiem.ATTRIBUTE_VALUE,
    hiem.MESSAGE_TEXT
FROM
    HRC_INTEGRATION_RUNS hir
    JOIN HRC_INTEGRATION_ERRORS hie ON hir.INTEGRATION_RUN_ID = hie.INTEGRATION_RUN_ID
    JOIN HRC_INTEGRATION_ERROR_MESSAGES hiem ON hie.INTEGRATION_ERROR_ID = hiem.INTEGRATION_ERROR_ID
WHERE
    hir.INTEGRATION_RUN_ID = :your_run_id
ORDER BY
    hie.RECORD_NUMBER, hiem.ERROR_SEQUENCE;

Then paste the results into your AI assistant with this prompt structure:

Effective HDL Debug PromptI have an HDL load failure. Here are the error details from the 3-table debug chain: BUSINESS_OBJECT: Worker MESSAGE_NAME: HR_WORKER_NOT_FOUND ATTRIBUTE_NAME: PersonNumber ATTRIBUTE_VALUE: 1234567 MESSAGE_TEXT: The worker with person number 1234567 was not found. The load is trying to add a Work Relationship for this person. What is the most likely root cause, what verification SQL should I run to confirm, and what is the fix?

With the correct system prompt loaded, you'll get a specific root cause (likely: person number exists but effective date gap, or ASSIGNMENT_TYPE mismatch), the exact verification query, and the fix. Without the system prompt, you get generic Oracle documentation summary that doesn't help.

Example AI Response (with system prompt loaded)

Most likely cause: The person number exists but there is a date-effective gap — the person record has EFFECTIVE_END_DATE before the Work Relationship effective date in your .dat file. This is different from the person not existing at all (which would show no rows at all in the verification query).

Verification query: SELECT PERSON_ID, EFFECTIVE_START_DATE, EFFECTIVE_END_DATE FROM PER_ALL_PEOPLE_F WHERE PERSON_NUMBER = '1234567' ORDER BY EFFECTIVE_START_DATE — look for a gap between the last end date and your intended work relationship start date.

Fix: Either update the person's effective end date in Oracle or adjust your Work Relationship START_DATE in the .dat file to fall within a valid person record date range.

6. OTBI Query Prompts That Work First Time

OTBI Logical SQL fails when you don't give the AI enough context about the subject area and the specific column names. Here's the prompt pattern that gets correct Logical SQL on the first attempt:

Effective OTBI Prompt StructureWrite an OTBI Logical SQL query for: - Subject area: Workforce Management - Worker Assignment Real Time - Goal: headcount by department as of 2026-03-31 - Columns I can see in the criteria tab: * Worker > Person Number * Assignment > Department Name * Assignment Details > Assignment Status * Assignment Details > Primary Assignment Flag - Filters needed: Active Assignment status only, primary assignments only - Output: one row per department with count of distinct person numbers - Sort: descending by headcount

The critical elements:

The Most Common OTBI Mistakes AI Makes (and How to Catch Them)

MistakeHow to Spot ItFix Prompt
Uses standard SQL table namesQuery has FROM PER_ALL_ASSIGNMENTS_M"Use OTBI Logical SQL with quoted subject area column paths, not database table names"
Uses DATEDIFF instead of TIMESTAMPDIFFQuery has DATEDIFF(day, ...)"Use TIMESTAMPDIFF(SQL_TSI_DAY, ...) — OTBI doesn't support DATEDIFF"
Tries to JOIN subject areas with commasQuery has FROM subjectA, subjectB"OTBI doesn't support multi-subject-area joins in Logical SQL — use one subject area or switch to BI Publisher SQL"
Uses SELECT DISTINCTQuery starts with SELECT DISTINCT"Use COUNT DISTINCT or GROUP BY instead — OTBI doesn't support SELECT DISTINCT"
Wrong effective date filterNo date filter, or wrong column used"Add effective date filter using the 'Effective Date' column in the subject area, not a database column"

7. Fast Formula Debugging Prompts

Fast Formula is one of the highest-value AI use cases because Stack Overflow and Google have essentially no Fast Formula coverage. An AI with the right context can debug formula syntax errors and write working formulas from business requirements.

Fast Formula Debug PromptI have an Oracle Fast Formula error. Please help debug it. Formula type: Absence Accrual (ACP formula type) Error message: "Error: Expected RETURN statement at line 23" Legislative Data Group: US LDG Here is my formula: [paste formula code here] The formula should: accrue 5 days per year for employees with less than 1 year of service, 10 days for 1-3 years, 15 days for 3+ years. The service date should come from the work relationship start date.
Fast Formula Write-From-Requirements PromptWrite an Oracle Fast Formula for the following business rule: Formula type: Payroll (Salary Basis) LDG: UK LDG Rule: If an employee works more than 40 hours per week, calculate overtime at 1.5x their hourly rate for all hours above 40. The hourly rate should come from their annual salary divided by 52 weeks and then 40 hours. Include: - All required DEFAULT statements - GET_CONTEXT for any context variables needed - Correct RETURN statement with the variable name expected by Oracle - Comments explaining each calculation step

Pro tip: Always specify the formula type (Payroll, Absence, Benefits, Compensation) in your prompt. Fast Formula has different built-in functions and context variables available in each type — the AI needs this to generate correct code.

8. ChatGPT vs Claude for Oracle HCM Work

Both models work with the right system prompt. The differences matter for Oracle HCM:

CapabilityClaude (Anthropic)ChatGPT (OpenAI)
Context window200K tokens (Claude Pro)128K tokens (GPT-4o)
System prompt storageClaude Projects — persists across sessionsGPT Custom Instructions — persists, less structured
File uploadProject files — searched across conversationsAttachments per conversation, not persistent
Code generation qualitySlightly better at following strict syntax rulesComparable on SQL; slightly better at explaining errors
Hallucination rateLower when instructed to flag uncertaintyHigher tendency to generate plausible-looking wrong schema
Oracle HCM specificityNeeds explicit context (as described above)Same — no model has been trained on Oracle HCM specifically
Verdict for HCM workBetter for long sessions, HDL multi-step debugBetter for quick one-off queries, when no project setup

Bottom line: Claude Projects wins for ongoing Oracle HCM consulting work because the context is loaded automatically. ChatGPT custom GPTs are the equivalent setup but require more manual configuration. Either model works — the system prompt quality matters more than the model choice.

9. What NOT to Ask Your Oracle HCM AI Assistant

Setting the right expectations matters. There are things an AI assistant — even one with perfect Oracle HCM context — should not be trusted to do:

⚠️

The verification rule: For any AI-generated SQL that will touch production Oracle HCM data, run SELECT COUNT(*) FROM (...your query...) first. If the count is unexpected, investigate before proceeding. The AI is a first draft, not a final answer.

Within those guardrails, an Oracle HCM AI assistant with the right setup is a genuine force multiplier. HDL errors that would take 2 days get resolved in 20 minutes. OTBI queries that would require a consultant get written in 5. Fast Formula syntax issues that have no Stack Overflow answers get debugged in one conversation.

The setup is a one-time 30-minute investment. The daily time savings compound every week you use it.

Get the Full Oracle HCM AI Toolkit

Ready-to-paste system prompt, 50+ production SQL queries, and the OBIEE Logical SQL cheat sheet — the three documents that make Oracle HCM consulting faster. Used as the foundation for this guide.

Request the Toolkit →

Related Guides on HCM Tables

Beyond Oracle HCM

Looking for AI tools outside the Oracle ecosystem? AI Tools HQ covers 1,000+ AI tools for HR, finance, and business operations — with verified reviews and use-case comparisons that help you evaluate what to pair with your HCM stack.

Browse AI Tools HQ →