Oracle EBS R12 GL Matix report in Text Format

--OGL Pivot Trial balance report in Text Format

Create Global Temporary Table XXJG_OGL_GL_CLS_TMP (
    ogl_code                  VARCHAR2(50),
    ogl_description           VARCHAR2(240),
    branch_code               VARCHAR2(50),
    branch_description        VARCHAR2(240),
    product_code              VARCHAR2(50),
    product_description       VARCHAR2(240),
    source_system_code        VARCHAR2(50),
    source_system_description VARCHAR2(240),
    balance_date              VARCHAR2(20),
    closing_amt               NUMBER
)
ON COMMIT Preserve ROWS; 
/


CREATE OR REPLACE PROCEDURE XXJG_OGL_GL_CLS_P (
    p_errbuf                OUT NOCOPY VARCHAR2,
    p_retcode               OUT NOCOPY NUMBER,
    P_ACCESS_SET_ID         IN VARCHAR2,
    P_LEDGER_NAME           IN VARCHAR2,
    P_LEDGER_ID             IN NUMBER,
    P_CHART_OF_ACCOUNTS_ID  IN NUMBER,
    P_CURRENCY_CODE         IN VARCHAR2 DEFAULT 'ALL',
    P_LEGAL_ENTITY          IN VARCHAR2,
    P_ACCT_FROM             IN VARCHAR2 DEFAULT NULL,
    P_ACCT_TO               IN VARCHAR2 DEFAULT NULL,    
    P_START_DATE            IN VARCHAR2,
    P_END_DATE              IN VARCHAR2,
    P_BRANCH_FROM           IN VARCHAR2,
    P_BRANCH_TO             IN VARCHAR2,
    P_PRODUCT_FROM          IN VARCHAR2,
    P_PRODUCT_TO            IN VARCHAR2,
    P_SOURCE_FROM           IN VARCHAR2,
    P_SOURCE_TO             IN VARCHAR2
)
IS
    CURSOR c_data IS
        SELECT 
            gcc.segment2 AS OGL_CODE,
            apps.gl_flexfields_pkg.get_description_sql(gcc.chart_of_accounts_id, 2, gcc.segment2) AS OGL_DESCRIPTION,
            gcc.segment3 AS BRANCH_CODE,
            apps.gl_flexfields_pkg.get_description_sql(gcc.chart_of_accounts_id, 3, gcc.segment3) AS BRANCH_DESCRIPTION,
            gcc.segment6 AS PRODUCT_CODE,
            apps.gl_flexfields_pkg.get_description_sql(gcc.chart_of_accounts_id, 6, gcc.segment6) AS PRODUCT_DESCRIPTION,
            gcc.segment8 AS SOURCE_SYSTEM_CODE,
            apps.gl_flexfields_pkg.get_description_sql(gcc.chart_of_accounts_id, 8, gcc.segment8) AS SOURCE_SYSTEM_DESCRIPTION,
            TO_CHAR(accounting_date, 'DD-MON-YYYY') AS BALANCE_DATE,
            SUM(end_of_date_balance_num) AS CLOSING_AMT
        FROM
            gl_daily_balances_v gv
            JOIN gl_code_combinations_kfv gcc  
                ON gv.code_combination_id = gcc.code_combination_id
        WHERE
            gv.ledger_id = P_LEDGER_ID
            AND period_type = '21'
            AND accounting_date BETWEEN fnd_date.canonical_to_date(P_START_DATE)
                                    AND fnd_date.canonical_to_date(P_END_DATE)
            AND currency_type IN ('O', 'T', 'U')
            AND (P_CURRENCY_CODE = 'ALL' OR ledger_currency = P_CURRENCY_CODE)
            AND gcc.segment2 BETWEEN NVL(P_ACCT_FROM, gcc.segment2) AND NVL(P_ACCT_TO, gcc.segment2)
            AND gcc.segment3 BETWEEN NVL(P_BRANCH_FROM, gcc.segment3) AND NVL(P_BRANCH_TO, gcc.segment3)
            AND gcc.segment6 BETWEEN NVL(P_PRODUCT_FROM, gcc.segment6) AND NVL(P_PRODUCT_TO, gcc.segment6)
            AND gcc.segment8 BETWEEN NVL(P_SOURCE_FROM, gcc.segment8) AND NVL(P_SOURCE_TO, gcc.segment8)
        GROUP BY 
            gcc.chart_of_accounts_id,
            gcc.segment2, 
            gcc.segment3, 
            gcc.segment6, 
            gcc.segment8, 
            TO_CHAR(accounting_date, 'DD-MON-YYYY');

    v_cols       VARCHAR2(32000);
    v_sql        CLOB;
    v_header     VARCHAR2(32767);
    v_col_count  NUMBER := 0;

BEGIN
    p_retcode := 0;
    p_errbuf := NULL;

    DELETE FROM XXJG_OGL_GL_CLS_TMP;
    COMMIT;

    FOR rec IN c_data LOOP
        INSERT INTO XXJG_OGL_GL_CLS_TMP (
            ogl_code,
            ogl_description,
            branch_code,
            branch_description,
            product_code,
            product_description,
            source_system_code,
            source_system_description,
            balance_date,
            closing_amt
        ) VALUES (
            rec.ogl_code,
            rec.ogl_description,
            rec.branch_code,
            rec.branch_description,
            rec.product_code,
            rec.product_description,
            rec.source_system_code,
            rec.source_system_description,
            rec.balance_date,
            rec.closing_amt
        );
    END LOOP;

    COMMIT;

    -- Build safe pivot IN clause using valid aliases
    v_cols := '';
    FOR d IN (
        SELECT DISTINCT balance_date
        FROM XXJG_OGL_GL_CLS_TMP
        ORDER BY TO_DATE(balance_date, 'DD-MON-YYYY')
    ) LOOP
        v_cols := v_cols || '''' || d.balance_date || ''' AS "D_' ||
                   REPLACE(d.balance_date, '-', '_') || '",';
        v_col_count := v_col_count + 1;
    END LOOP;

    IF v_col_count = 0 THEN
        FND_FILE.PUT_LINE(FND_FILE.OUTPUT, 'No data found for given parameters.');
        RETURN;
    END IF;

    v_cols := RTRIM(v_cols, ',');

    -- Build pivot SQL
    v_sql := 'SELECT ogl_code, ogl_description, branch_code, branch_description, ' ||
             'product_code, product_description, source_system_code, source_system_description';

    FOR d IN (
        SELECT DISTINCT balance_date
        FROM XXJG_OGL_GL_CLS_TMP
        ORDER BY TO_DATE(balance_date, 'DD-MON-YYYY')
    ) LOOP
        v_sql := v_sql || ', TO_CHAR(NVL("D_' || REPLACE(d.balance_date, '-', '_') ||
                  '", 0)) AS "' || d.balance_date || '"';
    END LOOP;

    v_sql := v_sql ||
             ' FROM (SELECT ogl_code, ogl_description, branch_code, branch_description, ' ||
             'product_code, product_description, source_system_code, source_system_description, balance_date, closing_amt ' ||
             'FROM XXJG_OGL_GL_CLS_TMP) ' ||
             'PIVOT (SUM(closing_amt) FOR balance_date IN (' || v_cols || ')) ' ||
             'ORDER BY ogl_code, branch_code, product_code';

    FND_FILE.PUT_LINE(FND_FILE.LOG, 'Generated SQL: ' || v_sql);

    -- Header
    v_header := 'OGL Code|OGL Description|Branch Code|Branch Description|Product Code|Product Description|Source System Code|Source System Description';

    FOR d IN (
        SELECT DISTINCT balance_date
        FROM XXJG_OGL_GL_CLS_TMP
        ORDER BY TO_DATE(balance_date, 'DD-MON-YYYY')
    ) LOOP
        v_header := v_header || '|' || d.balance_date;
    END LOOP;

    FND_FILE.PUT_LINE(FND_FILE.OUTPUT, v_header);

    -- Execute and print
    DECLARE
        c INTEGER;
        col_cnt INTEGER;
        desc_tab DBMS_SQL.DESC_TAB;
        col_val  VARCHAR2(32767);
        line_txt VARCHAR2(32767);
        ignore   INTEGER;
    BEGIN
        c := DBMS_SQL.OPEN_CURSOR;
        DBMS_SQL.PARSE(c, v_sql, DBMS_SQL.NATIVE);
        DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, desc_tab);

        FOR i IN 1 .. col_cnt LOOP
            DBMS_SQL.DEFINE_COLUMN(c, i, col_val, 4000);
        END LOOP;

        ignore := DBMS_SQL.EXECUTE(c);

        WHILE DBMS_SQL.FETCH_ROWS(c) > 0 LOOP
            line_txt := '';
            FOR i IN 1 .. col_cnt LOOP
                DBMS_SQL.COLUMN_VALUE(c, i, col_val);
                IF i > 1 THEN
                    line_txt := line_txt || '|';
                END IF;
                line_txt := line_txt || NVL(col_val, '0');
            END LOOP;
            FND_FILE.PUT_LINE(FND_FILE.OUTPUT, line_txt);
        END LOOP;

        DBMS_SQL.CLOSE_CURSOR(c);
    END;

EXCEPTION
    WHEN OTHERS THEN
        p_retcode := 2;
        p_errbuf := 'Error: ' || SQLERRM;
        FND_FILE.PUT_LINE(FND_FILE.LOG, 'Error: ' || SQLERRM);
        ROLLBACK;
END XXJG_OGL_GL_CLS_P;
/


Matrix Report in XML publisher

 Matrix Report in XML publisher Oracle EBS

H Account Code

Balance G1 BALANCE_DATEE

forACCOUNT_CODE

G 999.00E  E


H --> <?horizontal-break-table:1?>

for --> <?for-each-group@section:G_1;./ID?><?variable@incontext:DESC;ID?>

E--> <?end for-each-group?>


G1   --> <?for-each-group@column://G_1;BALANCE_DATE?>

E --> <?end for-each-group?>


G  --> <?for-each-group@cell://G_1;BALANCE_DATE?> 

999.00 --> <?if:count(current-group()[ID=$DESC])?> <?current-group()[ID=$DESC]/CLOSING_BALANCE?> <?end if?>
E --> <?end for-each-group?>

Oracle AI Agent Studio Sample Questions Answered

 (1) A retail company needs to streamline its order-to-cash process by using an AI Agent Studio to generate invoices and send them directly to customers.

Which tools are required to build this automation?

Ans: - Business Object tool for accessing invoice data and Email tool for sending customer communications

(2) Which tool can be used for enabling an agent to send summary notifications to users after key transactions?

Ans: -Email tool, to write and send summary emails to recipient

(3) When preparing to test agents in AI Agent Studio, how do you use evaluation test data?

Ans: -Upload a collection of test inputs and reference answers to compare agent performance during offline testing.

(4) What is the first step to perform agent evaluation in Oracle AI Agent Studio?

Ans: - Create and Upload evaluation sets with sample questions and reference answers.

(5) An Implementation consultant must ensure that all agent workflows requiring sensitive updates, such as deleting customer data, present safeguards before execution.

In which two ways does AI Agent Studio supports this?

Ans: -Using role-based security and Fusion user Tokens to authorize sensitive operations.

Adding Human Reviews (Human in the loop) before completing sensitive transactions

(6)  Which two features are essential for structured agent testing?

Ans: - Comparison of evaluation runs for changes

Evaluation test data management for storing test cases.

(7) A department requires an agent workflow that must access data in third party system

And custom data objects with Fusion Applications.

What should the department do to build this agent in AI Agent Studio?

Ans: - Build the Agent Workflow from scratch

(8) How is the External REST tool utilized within Oracle AI Agent Studio?

Ans: -It enables agents to exchange information from systems outside of Fusion Application through defined API’s.

(9) What distinguishes a Reasoning agent from a standard answer agent in Oracle AI Agent Studio?

Ans: -Reasoning Agent can plan, optimize and execute multi step workflows, while Answer agents primarily provide contextual guidance or responses.

(10) For an AI Agent configured to update employee data in Fusion Applications, what method within AI Agent Studio ensures sensitive changes are securely managed?

Ans: -Add a human in the loop step that requires approval before changes sensitive data.

(11) You are reviewing an agent that is in production. Your client wants you to improve the agents Logic and requires you to build a new version.

To confirm that an agent logic has improved in new version after deployment, which AI Agent Studio capability should you use?

Ans: -Run a comparative analysis of the two versions.

(12) A Service manager is customizing an agent to retrieve customer data.

Which two practices keep sensitive customer information secure?

Ans: - Prune the response fields returned from business object queries to only what’s needed.

Implement role-based controls to allow only authorized roles to execute certain queries.

(13) Your support lead wants to optimize agent workflow for both accuracy and customer wait time.

Which combination of matrices should they used?

Ans: - Correctness and Latency

(14) which two scenarios require an agent to use the External REST tool?

Ans: -When an agent needs to access data from a third-party logistics system

When an Agent needs to retrieve data from an internal compliance database.

(15) When Configuring agents in Oracle AI Agent Studio, which two types of tools can be included within agent workflows?

External REST tools for connecting to other systems

Business Object tool for data transactions

(16) A company want to Implement AI Agent to automate its customer service process. They want to use a tool to integration with their CRM system to retrieve customer data.

Which Type of Tool should they use?

Ans: -External REST tool

(17) A support lead wants an agent to categorize, triage and route incoming service request based on multiple product and service criteria to the right department.

Which OOTB agent template fits this scenario?

Ans: -SR Triage Agent

(18) You need an agent to fetch real time sales order status from an external logistics platform.

Which tool in AI Agent Studio helps these automations?

Ans: -External REST Tool.

(19) The HR Team wants to provide employees with a self-service agent that can answer questions about the company’s medical, dental and vision benefits.

Which OOTB Agent template fits this scenario?

Ans: - Benefits Agent

(20) Before Publishing a new agent built from a template in AI Agent Studio, which two actions must be completed?

Ans: - Performing design time/offline testing to ensure the agents works correctly.

Reviewing and adjusting the agent’s system prompt and topics as needed

(21) Which is the pre-built agent in Oracle Fusion HCM enables users to review salary progression, additional compensation, and compare salary decisions for their teams based on market trends and benchmarks across employees?

Ans: Compensation Agent  

(22) Which set of matrices evaluates an agent’s security in Oracle AI Agent Studio?

Ans: -Prompt injection and content safety metrics.

(23) When working in AI Agent Studio, what are the two reasons a user might decide to clone an out of the box (OOTB) agent template?

Ans: -To customize the agent’s system prompts and topics for organization specific requirement.

To extend the agents functionality by adding new tools or integrations unique to use a case

(24) To tailor a supplier negotiation agent’s persona and reasoning. What must you edit or customize within the template?

Ans: -System prompts and topics for the agent

(25) Which two agents are available as prebuilt templates in AI Agent Studio?

Ans: - Benefits Agents

Payslip Agents

 

(26) A business analyst is asked to monitor quality over time for a compensation planning agent. The analyst wants a single point of access to the agent’s correctness scores and safety results, updated continuously.

Which AI Agent Studio feature should be used?

Ans: -Matrices Reporting Dashboard.

(27) During agent testing, how do matrices for latency and tokens help ensure quality?

Ans: -Confirm that the agent response wait time is acceptable and indicates the financial cost of running the Agent.

(28) Executives require high level report on how often agents run into errors how quickly most queries are resolved and the general quality of the agent’s performance for quarterly reviews.

Which two metrics in AI Agent Studio would deliver the required insights?

Ans: -

Median Correctness

Error Rate and Median/P99 Latency Reporting

(29) An HR administrator wants to quickly deploy an agent to help employee navigate company benefits and tailor the agent’s response to their organization’s specific policies.

Which two steps can the administrator take using prebuilt templates in AI Agent Studio?

Ans: -

Customize the system prompt of the benefits Agent template with company policy details

Adjust the Agent’s topic to cover organization specific benefits scenarios.

 

(30) How do you use the agent tracing feature in the Metrices Reporting Dashboard?

Ans: -To Review specific prompts for analysing inputs, outputs and performance metrics.

(31) What are the components of Oracle AI Agent Studio?

Ans: -Agent Teams, tools, templates and topics

(32) A supply chain specialist uses the Outbound Compliance Agent Templates but needs to ensure the agent accounts for recently updated hazardous material regulations.

In Which two ways can the specialist customized the OOTB agent?

Ans: - Create additional topics to address specific regulation updates

Revise the system prompt to provide information on new regulatory requirements.

(33) What is difference between System Prompts and Topics in Oracle AI Agents Studios?

Ans: -System Prompts define the agent’s role and instructions, Topics refine the scope or content for specific tasks.

(34) An Agent needs to summarize information from uploaded company manuals or guides to provide up to date answers for the users.

Which tool in AI Agent Studio should use?

Ans: -Document Tool to enable semantic search to base response in unstructured documents.

(35) When should you use a multi agents’ solution?

Ans: - For orchestrating complex processes involving multiple specialized tasks.

 

(36) A financial controller Implements a Pricing Promotions Agent Templates but periodic industry promotions require industry specific compliance language in promotional summaries.

In which two ways can the controller customize the agent templates to address this requirement.

Ans: - Add Topics detailing specific compliance requirements by promotion type.

Updated the system prompt with compliance language for industry specific promotions.

(37) Which Matric is used to calculate the financial cost of using an AI Agent?

Ans: -Tokens Consumed

(38) When using prebuilt templates in AI Agent Studio Which two actions are supported?

Ans: -Configuring and deploying Oracle delivered agents rapidly using a CatLog of template.

Designing single agent workflows to meet business requirements

(39) How do you access the output quality of two versions of an agents?

Ans: -Run an evaluation of each agent using expected Inputs and outputs.

(40) A Sales leader wants agents to generate customer communications that match their company’s tone.

Which two customizations should the sales leader make to the agent templates?

Ans: - Modify the system prompt to specify tone and language preference.

Create additionally topics depicting various customer interaction scenarios.


How to Upload Data into FND_LOOKUP_VALUES Using Oracle R12 API

SET SERVEROUTPUT ON SIZE 1000000
SET ECHO OFF
SET VERIFY OFF
SET DEFINE "~"
SET ESCAPE ON
DECLARE
XROW     ROWID;  --You cant directly give Row Id to the x_rowid parameter,
ln_rowid1   ROWID;
l_rowid VARCHAR2(100):= 0;
l_rec number:= 0;

CURSOR c 
IS     

select * -- LOOKUP_CODE, xgl.MEANING MEANING,DESCRIPTION,NEW_TAG,LOOKUP_TYPE 
--select  LOOKUP_CODE, SUBSTR(MEANING,1,79) MEANING,DESCRIPTION,NEW_TAG,LOOKUP_TYPE 
from XXOGL_LOOKUP_VALUES_STG xgl
Where rownum <=3500
AND  NVL(STATUS,'N') <> 'S'
--AND xgl.LOOKUP_CODE ='203011001'
AND NOT EXISTS 
        (Select 1 from  FND_LOOKUP_VALUES flv
        where flv.LOOKUP_TYPE ='OGL_IGAAP_PROFIT_LOSS_MAP'
        AND flv.LOOKUP_CODE = xgl.LOOKUP_CODE ); --My Custom Query to have fetch in my custom table

--cursor c1 is
--select distinct LOOKUP_TYPE 
--from xxcsb.xxcsb_gl_lookup_values_stg;

BEGIN
/*
for i in c1  -- For loop for Inserting lookup types
loop

fnd_lookup_types_pkg.insert_row (x_rowid    => XROW,
x_lookup_type              => i.lookup_type,  --–cursor values
x_security_group_id        => 0,
x_view_application_id      => 101,
x_application_id           => 101,
x_customization_level      => 'U',
x_meaning                  => i.lookup_type,
x_description              => i.lookup_type,
x_creation_date            => SYSDATE,
x_created_by               => 1133,
x_last_update_date         => SYSDATE,
x_last_updated_by          => 0,
x_last_update_login        => 83810
);

DBMS_OUTPUT.put_line (XROW);

end loop;  --–Loop ends here

commit;*/
DBMS_OUTPUT.put_line ('Loop');
for i in c -- For loop for Inserting lookup values
loop
l_rowid := NULL;
--DBMS_OUTPUT.put_line ('inLoop');
BEGIN
fnd_lookup_values_pkg.insert_row (x_rowid       => l_rowid, --ln_rowid1,
        x_lookup_type              =>  I.LOOKUP_TYPE,  
        x_security_group_id        => 0,
        x_view_application_id      => 3,
        x_lookup_code              => I.LOOKUP_CODE,
        x_tag                      => NULL, --I.NEW_TAG,
        x_attribute_category       => I.LOOKUP_TYPE, --ATTRIBUTE_CATEGORY,
        x_attribute1               => NULL,
        x_attribute2               => NULL,
        x_attribute3               => NULL,
        x_attribute4               => NULL,
        x_enabled_flag             => 'Y',
        x_start_date_active        => NULL, --TO_DATE ('01-JAN-1950','DD-MON-YYYY'),
        x_end_date_active          => NULL,
        x_territory_code           => NULL,
        x_attribute5               => NULL,
        x_attribute6               => NULL,
        x_attribute7               => NULL,
        x_attribute8               => NULL,
        x_attribute9               => NULL,
        x_attribute10              => I.BS_CODE,
        x_attribute11              => NULL,
        x_attribute12              => NULL,
        x_attribute13              => NULL,
        x_attribute14              => NULL,
        x_attribute15              => NULL,
        x_meaning                  => I.MEANING,
        x_description              => I.DESCRIPTION,
        x_creation_date            => SYSDATE,
        x_created_by               => 1131,
        x_last_update_date         => SYSDATE,
        x_last_updated_by          => 1131,
        x_last_update_login        => 80533
);
l_rec := l_rec+1;
--I := I+1;
DBMS_OUTPUT.put_line (l_rec ||'-'|| I.LOOKUP_CODE);
DBMS_OUTPUT.put_line (ln_rowid1);
UPdate xxcsb.XXJG_GL_CC_LOB_LOOKUP_STG SET STATUS ='S'
WHERE LOOKUP_CODE  = I.LOOKUP_CODE;
Exception
when others then dbms_output.put_line('Exception Occured: '||SQLERRM);
END;
Commit;
end loop;


Exception
when others then dbms_output.put_line('Exception Occured: '||SQLERRM);
END;
/

Oracle EBS R12: Insert Lookup Data into FND_LOOKUP_VALUES with API

SET SERVEROUTPUT ON SIZE 1000000
SET ECHO OFF
SET VERIFY OFF
SET DEFINE "~"
SET ESCAPE ON
DECLARE
XROW     ROWID;  --You cant directly give Row Id to the x_rowid parameter,
ln_rowid1   ROWID;
l_rowid VARCHAR2(100):= 0;
l_rec number:= 0;

CURSOR c 
IS     

Select aa.LOOKUP_TYPE,aa.lookup_code,aa.meaning,aa.description,aa.tag,aa.VIEW_APPLICATION_ID, bb.tag new_tag,bb.description new_description
from fnd_lookup_values aa
,XXJG_GL_ACCOUNT_MAP bb
where aa.lookup_type = 'OGL_ACCOUNT_MAP'
and aa.LOOKUP_CODE = bb.LOOKUP_CODE
and aa.LOOKUP_CODE <> '416020105' ;        --Custom Query to have fetch in my custom table

--cursor c1 is
--select distinct LOOKUP_TYPE 
--from xxcsb.xxcsb_gl_lookup_values_stg;

BEGIN

DBMS_OUTPUT.put_line ('Loop');
for i in c -- For loop for Inserting lookup values
loop
l_rowid := NULL;
--DBMS_OUTPUT.put_line ('inLoop');
BEGIN
fnd_lookup_values_pkg.update_row (
        x_lookup_type              =>  I.LOOKUP_TYPE,  
        x_security_group_id        => 0,
        x_view_application_id      => I.VIEW_APPLICATION_ID,
        x_lookup_code              => I.LOOKUP_CODE,
        x_tag                      => I.NEW_TAG,
        x_attribute_category       => NULL,
        x_attribute1               => NULL,
        x_attribute2               => NULL,
        x_attribute3               => NULL,
        x_attribute4               => NULL,
        x_enabled_flag             => 'Y',
        x_start_date_active        => NULL, 
        x_end_date_active          => NULL,
        x_territory_code           => NULL,
        x_attribute5               => NULL,
        x_attribute6               => NULL,
        x_attribute7               => NULL,
        x_attribute8               => NULL,
        x_attribute9               => NULL,
        x_attribute10              => NULL,
        x_attribute11              => NULL,
        x_attribute12              => NULL,
        x_attribute13              => NULL,
        x_attribute14              => NULL,
        x_attribute15              => NULL,
        x_meaning                  => I.MEANING,
        x_description              => I.new_description,
       -- x_creation_date            => SYSDATE,
       -- x_created_by               => 1197,
        x_last_update_date         => SYSDATE,
        x_last_updated_by          => 1197,
        x_last_update_login        => 74795
);
l_rec := l_rec+1;
--I := I+1;
DBMS_OUTPUT.put_line (l_rec ||'-'|| I.LOOKUP_CODE);
DBMS_OUTPUT.put_line (ln_rowid1);
Commit;
Exception
when others then dbms_output.put_line('Exception Occurred: '||SQLERRM);
END;

Commit;
end loop;


Exception
when others then dbms_output.put_line('Exception Occured: '||SQLERRM);
END;
/

PO GRN with AP Invoice Account status and Approval Status Query

 SELECT
    rsh.receipt_num,rsh.creation_date GRN_creation_date,
    pha.segment1           po_number, pha.creation_date PO_creation_date,  
    rt.AMOUNT_BILLED,
    aia.invoice_num,
    aia.invoice_currency_code,
    aia.invoice_date,
    aia.gl_date,
    aia.invoice_amount,
    APPS.AP_INVOICES_PKG.GET_APPROVAL_STATUS
            (
             AIA.INVOICE_ID
            ,AIA.INVOICE_AMOUNT
            ,AIA.PAYMENT_STATUS_FLAG
            ,AIA.INVOICE_TYPE_LOOKUP_CODE
            ) Approval_Status
    ,DECODE(apps.AP_INVOICES_PKG.GET_POSTING_STATUS( aia.invoice_id ),
                            'P', 'Partial',
                            'N', 'Unaccounted',
                            'Y', 'Accounted')Account_Status        
    ,aps.vendor_name
    ,assa.vendor_site_code
    ,(Select gcc.CONCATENATED_SEGMENTS from rcv_receiving_sub_ledger rrs, GL_CODE_COMBINATIONs_kfv gcc
    Where rrs.CODE_COMBINATION_ID = gcc.CODE_COMBINATION_ID
    AND rrs.RCV_TRANSACTION_ID = Rt.TRANSACTION_ID
    AND rrs.ACCOUNTING_LINE_TYPE ='Receiving Inspection' ) RECEIVING_ACC --Accrual,Charge
    ,(Select gcc.CONCATENATED_SEGMENTS from rcv_receiving_sub_ledger rrs, GL_CODE_COMBINATIONs_kfv gcc
    Where rrs.CODE_COMBINATION_ID = gcc.CODE_COMBINATION_ID
    AND rrs.RCV_TRANSACTION_ID = Rt.TRANSACTION_ID
    AND rrs.ACCOUNTING_LINE_TYPE ='Accrual' ) Accrual_ACC --Accrual,Charge
FROM
    ap_invoices_all        aia,
    ap_invoice_lines_all   ail,
    rcv_transactions       rt,
    rcv_shipment_headers   rsh,
    po_distributions_all   pda,
    po_headers_all         pha,
    ap_suppliers           aps,
    ap_supplier_sites_all  assa
    --fnd_user               fu
WHERE 1=1
    AND ail.invoice_id = aia.invoice_id
    AND ail.rcv_transaction_id = rt.transaction_id(+)
    AND rt.shipment_header_id = rsh.shipment_header_id
    AND pda.po_header_id = pha.po_header_id
    AND pda.po_distribution_id = rt.po_distribution_id
    AND aia.vendor_id = aps.vendor_id
    AND aps.vendor_id = assa.vendor_id
    AND aia.vendor_site_id = assa.vendor_site_id
    --AND aia.created_by = fu.user_id
ORDER BY rsh.creation_date,
    aps.vendor_name  
    /

How to Enabled Disable this profile from Backend

How to ENABLEND this profile from Backend

Set serveroutput on

DECLARE
l_ret boolean;
l_user_id number;
BEGIN
select user_id
into l_user_id
from fnd_user
where user_name = '&&USER_NAME';
l_ret := fnd_profile.SAVE(X_NAME => 'FND_INIT_SQL',
X_VALUE => 'BEGIN FND_CTL.FND_SESS_CTL('''','''','''', ''TRUE'','''',''ALTER SESSION SET TRACEFILE_IDENTIFIER=''||''''''''||''&&USER_NAME'' ||''''''''||'' EVENTS =''||''''''''||'' 10046 TRACE NAME CONTEXT FOREVER, LEVEL 12 ''||''''''''); END;',
X_LEVEL_NAME => 'USER',
X_LEVEL_VALUE => l_user_id);
commit;
dbms_output.put_line('Profile has updated successfully');
EXCEPTION
when others then
dbms_output.put_line('Failed to update the profile: '||sqlerrm);
END;

How to disable this profile from Backend

You can disable using below PLSQL block


DECLARE
l_ret boolean;
l_user_id number;
BEGIN
select user_id
into l_user_id
from fnd_user
where user_name = '&USER_NAME';

l_ret := fnd_profile.DELETE(X_NAME => 'FND_INIT_SQL',
X_LEVEL_NAME => 'USER',
X_LEVEL_VALUE => l_user_id);

commit;

dbms_output.put_line('Profile has erased successfully');

EXCEPTION
when others then
dbms_output.put_line('Failed to erase the profile: '||sqlerrm);
END;

Troubleshooting Issues with the Profile FND_INIT_SQL

Some time many user might be getting below error while logging to Applications



ORA-20001: Oracle error -20001: ORA-20001: -: While executing SQL in profile

FND_INIT_SQL:BEGIN FND_CTL.FND_SESS_CTL('','', '', 'TRUE','','ALTER S has been detected in FND_GLOBAL.INITIALIZE. ORA-20001: Oracle error -20001: ORA-20001 -:

While executing SQL in profile FND_INIT_SQL:BEGIN FND_CTL.FND_SESS_CTL('','','', 'TRUE','','ALTER S has been detected in FND_GLOBAL.INITIALIZE.

This happen if the profile is not set in correct manner.



In this case, we can run below query to check this profile at all the levels in the applications


set serveroutput on
set echo on
set timing on
set feedback on
set long 10000
set linesize 120
set pagesize 132
column SHORT_NAME format A30
column NAME format A40
column LEVEL_SET format a15
column CONTEXT format a30
column VALUE format A60 wrap

select p.profile_option_name SHORT_NAME,
n.user_profile_option_name NAME,
decode(v.level_id,
10001, 'Site',
10002, 'Application',
10003, 'Responsibility',
10004, 'User',
10005, 'Server',
10007, 'SERVRESP',
'UnDef') LEVEL_SET,
decode(to_char(v.level_id),
'10001', '',
'10002', app.application_short_name,
'10003', rsp.responsibility_key,
'10005', svr.node_name,
'10006', org.name,
'10004', usr.user_name,
'10007', 'Serv/resp',
'UnDef') "CONTEXT",
v.profile_option_value VALUE
from fnd_profile_options p,
fnd_profile_option_values v,
fnd_profile_options_tl n,
fnd_user usr,
fnd_application app,
fnd_responsibility rsp,
fnd_nodes svr,
hr_operating_units org
where p.profile_option_id = v.profile_option_id (+)
and p.profile_option_name = n.profile_option_name
and upper(p.profile_option_name) like '%FND_INIT_SQL%'
and usr.user_id (+) = v.level_value
and rsp.application_id (+) = v.level_value_application_id
and rsp.responsibility_id (+) = v.level_value
and app.application_id (+) = v.level_value
and svr.node_id (+) = v.level_value
and org.organization_id (+) = v.level_value
order by short_name, level_set;

Now we can null the problematic level and solve the issue.If it is site level which is causing issue. we can delete it by using the query


UPDATE fnd_profile_option_values
SET profile_option_value = NULL
WHERE profile_option_id = 3157 AND
level_id = 10001 AND
level_value = 0;



COMMIT;

Oracle Cloud Infrastructure AI Foundations

 Practice Exam: Oracle Cloud Infrastructure AI Foundations

1 In the context of machine learning, what does "overfitting" refer to?
Ans: A model that performs well on the training data but poorly on new data.

2.What is the primary goal of fine-tuning a Large Language Model (LLM)?
Ans: To adjust the pretrained model's parameters using a smaller, task-specific dataset, thereby improving its performance on specific tasks.

3. What is OCI Document Understanding primarily used for?
Ans: Automating document processing tasks

4 What is the role of the loss function in supervised learning algorithms?
Ans: It quantifies the cost of incorrect predictions.

5. Which of these is NOT a common application of unsupervised machine learning?
Ans: Spam detection

6. Which AI domain is primarily associated with the task of detecting and recognizing faces in images or videos?
Ans: Vision

7: What technique is used to predict the price of a house based on its features?
Ans: Regression

8. Which customization method can add latency to each request made to the LLM?
Ans: Retrieval Augmented Generation (RAG)

9. Which generative AI model has been particularly influential in Large Language Models (LLMs) for large-scale text generation and advanced natural language understanding?
Ans: Transformer-based models

10. Which optimization method requires a labeled dataset that can be most expensive and time-consuming to acquire compared to others?
Ans: Fine-tuning

11. When preparing data for a Machine Learning model, what are typically considered as input features?
Ans: Data collected after the model has made predictions

12. What does Retrieval Augmented Generation (RAG) involve?
Ans: Querying enterprise knowledge bases to provide grounded responses

13. Which type of model is most effective for sequence-to-sequence tasks such as machine translation?
Ans: Encoder-Decoder Transformer

14. Which algorithm is a nonparametric approach for supervised learning?
Ans: K-Nearest Neighbors (KNN)

15. What is one of the main challenges RNNs face when processing sequential data?
Ans: They struggle with understanding relationships between words that are far apart.

16. Which type of machine learning algorithm is used in predicting house prices?
Ans: Supervised Regression

17. In supervised learning, what does the term "hyperparameter" refer to?
Ans: A parameter set before training the model

18. What type of data is most likely to be used with Deep Learning algorithms?
Ans: Complex data with nonhuman interpretable features

19. How does Select AI enhance the interaction with Oracle Autonomous Database?
Ans: By enabling natural language prompts instead of SQL code

20. What is the main function of the encoder in a Transformer model?
Ans: To convert input text into embeddings

21. Which deep learning architecture is well-suited for processing sequential data such as sentences?
Ans: Recurrent Neural Network (RNN)

22. In the SQL Query Generation Process Flow, what is the second step after creating an AI Profile?
Ans: Specify Schemas and Tables

23. What is the primary goal of reinforcement learning?
Ans: To maximize cumulative reward

24. What is the purpose of the self-attention mechanism in Transformer-based models?
Ans: To model dependencies between different elements in a sequence

25. Which statement best describes the primary difference between Large Language Models (LLMs) and traditional Machine Learning (ML) models?
Ans: LLMs are pretrained on a large text corpus whereas ML models need to be trained on the custom data.

26. What is the primary capability of the OCI Language service?
Ans: Process unstructured data and extract insights

27. What role do tokens play in Large Language Models (LLMs)?
Ans: They are individual units into which a piece of text is divided during processing by the model.

28. What is the primary problem associated with vanishing gradients in Recurrent Neural Networks (RNNs)?
Ans: RNNs get extremely small gradients during backpropagation.

29. Which is NOT a part of Oracle Responsible AI guidelines?
Ans: Ensuring equality

30. What is the primary function of the inference process in machine learning?
Ans: Predicting outcomes from new data points

31. Question: world scenario?
Ans: Supervised learning is used for training models with labeled data, unsupervised learning is used for discovering hidden patterns in unlabeled data, and reinforcement learning is used for decision-making in dynamic environments.

32. Which task uses Generative AI?
Ans: Video generation

33. What is the role of a target variable in supervised learning?
Ans: It contains the desired output or class labels.

34. Which component of feedforward neural network is responsible for processing input data and forwarding it through various layers to make predictions?
Ans: Hidden Layer

35.  An online bank wants to streamline the loan approval process. They have historical data on past loan applicants, including information on applicants' credit score, annual income, employment status, and whether they repaid the loan or defaulted.
Which machine learning algorithm can be used for this application?
Ans: Supervised Machine learning for classification

36. What is the primary role of Graphics Processing Units (GPUs) in modern computing?
Ans: Accelerating graphics rendering and parallel processing

37. You are writing poems. You need your computer to help you complete your lines by suggesting right words. Which Deep Learning model is well-suited for this task?
Ans: Recurrent Neural Network (RNN)

38. Which components are required to configure your data for natural language queries in Oracle Database 23ai?
Ans: Choose an LLM and Specify Schemas, Tables, and Views


39. Which AI domain can be used in the detection of fraudulent transactions?
Ans: 

40. In the context of machine learning, what does "overfitting" refer to?
Ans: 

Oracle AI In Fusion Cloud Enterprise Resource Planning (ERP) Test

 Oracle AI In Fusion Cloud Enterprise Resource Planning (ERP)

1. Which two criteria must your system meet before implementing AI Apps for Financials?
Ans: Must have six months of consumable data from Production
     Must not be a government instance

2. What job role must be provisioned to a user who is implementing AI Apps for Financials?
Ans: Application Implementation Consultant

3. What does ODA stand for?
Ans: Oracle Digital Assistant

4. In which two ways can users leverage Expenses Digital Assistant to enter expenses and create expense reports?
Ans: Use apps such as Slack, Microsoft Teams, Outlook and so on to create expense items.
     Take photos of receipts and upload to Expenses Digital Assistant.

5. Which type of Oracle's AI approach does the ERP fusion feature "Intelligent Document Combination Defaulting" use?
Ans: Non-Generative

6. What is the primary benefit of the Intelligent Accont Combination Defaulting feature?
Ans: It automates routing data entry and eliminates errors.

7. Which component does Oracle Digital Assistant use from its architecture to interact with applications such as Expenses?
Ans: Channels

8. What explains the significance of leveraging Pervasive AI?
Ans: It is strategically designed to be integrated across various business processes to enhance user experience by improving automation of tasks.

9. Which process trains the AI model in ERP Financials?
Ans: Data Ingestion

10. The integration of AI with financials has numerous benefits.
Which are two reasons for organizations to adopt AI features in ERP applications?
Ans:
Improved decision making, cost effective, and reduced error occurrence
Enables organizations to improve overall customer experience and retention

Oracle Cloud Applications Foundation Assessment Sample Q&A

Cloud Applications Foundation Assessment Overview Test Q&A

 1. Choose three statements that correctly define the benefits of Cloud Applications.
Ans: Instant Scalability
No software to license, install, and support for the SaaS application
Pay as you go basis

2. Which feature of Oracle Cloud Applications allows customers to leverage the new functionality immediately?
Ans: Automatic Updates


3. Which four Oracle Fusion Cloud Human Capital Management Services help manage a company's global workforce?
Ans: Recruiting and Hiring employees
Performance Management, Learning, and Succession Planning
Strategic Workforce Planning
Benefits and Global Payroll

4. Which four of the following processes are part of the employee life cycle?
Ans: Transfer
Hire
Termination
Promotion

5. Identify the UX methodology on which Oracle’s cloud applications are based on
Ans: Redwood Design


6. Which three of the following processes are part of Enterprise Resource Planning?
Ans: Financial Consolidation and Close
Revenue Management
Risk and Compliance

7. Which three of the following processes are part of Supply Chain Management?
Ans: Warehouse Management
Transportation Management
Inventory

8. Which Application can sellers use to quickly meet their customers’ pricing needs?
Ans: Oracle Configure, Price, Quote (CPQ)


9. Which Oracle CX Product helps manage leads and opportunities?
Ans: Oracle Sales Cloud

10. Which of the below capability enables cloud applications to provide built-in innovation and gives the ability to respond faster to a dynamic marketplace?
Ans: Machine Learning and Artificial Intelligence

Oracle Cloud Infrastructure Generative AI Professional (1Z0-1127-24) Test: Practice Exam

 Test: Practice Exam: Oracle Cloud Infrastructure Generative AI Professional

1. Which LangChain component is responsible for generating the linguistic output in a chatbot system?
LLMs 

2. How does the structure of vector databases differ from traditional relational databases?
Ans: It is based on distances and similarities in a vector space. 

3. How can the concept of "Groundedness" differ from "Answer Relevance" in the context of Retrieval Augmented Generation (RAG)?
Ans: Groundedness pertains to factual correctness, whereas Answer Relevance concerns query relevance. 

4. What does the RAG Sequence model do in the context of generating a response?
Ans: For each input query, it retrieves a set of relevant documents and considers them together to generate a cohesive response. 

5. How does the temperature setting in a decoding algorithm influence the probability distribution over the vocabulary?
Ans: Increasing the temperature flattens the distribution, allowing for more varied word choices. 

6. Given the following code block: history = StreamlitChatMessageHistory(key="chat_messages")
memory = ConversationBufferMemory(chat_memory=history)

Which statement is NOT true about StreamlitChatMessageHistory?
Ans: StreamlitChatMessageHistory can be used in any type of LLM application. 

7. Which statement is true about string prompt templates and their capability regarding variables?
Ans: They support any number of variables, including the possibility of having none. 

8. What is the purpose of Retrievers in LangChain?
Ans: To retrieve relevant information from knowledge bases 

9. Which statement is true about Fine-tuning and Parameter-Efficient Fine-Tuning (PEFT)?
Ans: Fine-tuning requires training the entire model on new data, often leading to substantial computational costs, whereas PEFT involves updating only a small subset of parameters, minimizing computational requirements and data needs. 

10. What does a cosine distance of 0 indicate about the relationship between two embeddings?
Ans: They are similar in direction 

11. What does the Loss metric indicate about a model's predictions?
Ans: Loss is a measure that indicates how wrong the model's predictions are.

12. What is the purpose of Retrieval Augmented Generation (RAG) in text generation?
Ans: To generate text using extra information obtained from an external data source 

13. In the context of generating text with a Large Language Model (LLM), what does the process of greedy decoding entail?
Ans: Choosing the word with the highest probability at each step of decoding 

14. Accuracy in vector databases contributes to the effectiveness of Large Language Models (LLMs) by preserving a specific type of relationship. What is the nature of these relationships, and why are they crucial for language models?
Ans: Semantic relationships; crucial for understanding context and generating precise language 

15. In which scenario is soft prompting appropriate compared to other training styles?
Ans: When there is a need to add learnable parameters to a Large Language Model (LLM) without task-specific training 

16. What is LangChain?
Ans: A Python library for building applications with Large Language Models 

17. Why is it challenging to apply diffusion models to text generation?
Ans: Because text representation is categorical unlike images 

18. When does a chain typically interact with memory in a run within the LangChain framework?
Ans: After user input but before chain execution, and again after core logic but before output 

19. When is fine-tuning an appropriate method for customizing a Large Language Model (LLM)?
Ans: When the LLM does not perform well on a task and the data for prompt engineering is too large 

20. In the simplified workflow for managing and querying vector data, what is the role of indexing?
Ans: To map vectors to a data structure for faster searching, enabling efficient retrieval 

21. Which is a characteristic of T-Few fine-tuning for Large Language Models (LLMs)?
Ans: It selectively updates only a fraction of the model's weights. 

22. What does accuracy measure in the context of fine-tuning results for a generative model?
Ans: How many predictions the model made correctly out of all the predictions in an evaluation 

23. What do prompt templates use for templating in language model applications?
Ans: Python's str.format syntax 

24. How does a presence penalty function in language model generation?
Ans: It penalizes a token each time it appears after the first occurrence. 

25. How are documents usually evaluated in the simplest form of keyword-based search?
Ans: Based on the presence and frequency of the user-provided keywords 

Oracle Cloud Infrastructure 2024 Generative AI Professional (1Z0-1127-24) Test

 OCI Generative AI Professional

Test: Skill Check: Fundamentals of Large Language Models
1. What does in-context learning in Large Language Models involve?
Ans: Conditioning the model with task-specific instructions or demonstrations 

2. What is prompt engineering in the context of Large Language Models (LLMs)?
Ans: Iteratively refining the ask to elicit a desired response 

3. What is the role of temperature in the decoding process of a Large Language Model (LLM)?
Ans: To adjust the sharpness of probability distribution over vocabulary when selecting the next word 

4. What does the term "hallucination" refer to in the context of Language Large Models (LLMs)?
Ans: The phenomenon where the model generates factually incorrect information or unrelated content as if it were true 

5. Which statement accurately reflects the differences between these approaches in terms of the number of parameters modified and the type of data used?
Ans:Fine-tuning modifies all parameters using labeled, task-specific data, whereas Parameter Efficient Fine-Tuning updates a few, new parameters also with labeled, task-specific data. 

Test: Skill Check: OCI Generative AI Service Deep Dive

1. What is the main advantage of using few-shot model prompting to customize a Large Language Model (LLM)?
Ans: It provides examples in the prompt to guide the LLM to better performance with no training cost. 

2. Which is a distinctive feature of GPUs in Dedicated AI Clusters used for generative AI tasks?
Ans: The GPUs allocated for a customer’s generative AI tasks are isolated from other GPUs.

3. What is the purpose of embeddings in natural language processing?
To create numerical representations of text that capture the meaning and relationships between words or phrases 

4. What is the purpose of frequency penalties in language model outputs?
Ans: To penalize tokens that have already appeared, based on the number of times they have been used 

5. What happens if a period (.) is used as a stop sequence in text generation?
Ans: The model stops generating text after it reaches the end of the first sentence, even if the token limit is much higher. 

Test: Skill Check: Building Blocks for an LLM Application

1. Which is a key characteristic of Large Language Models (LLMs) without Retrieval Augmented Generation (RAG)?
Ans: They rely on internal knowledge learned during pretraining on a large text corpus. 

2. What differentiates Semantic search from traditional keyword search?
Ans: It involves understanding the intent and context of the search. 

3. What do embeddings in Large Language Models (LLMs) represent?
Ans: The semantic content of data in high-dimensional vectors 

4. What is the function of the Generator in a text generation system?
Ans: To generate human-like text using the information retrieved and ranked, along with the user's original query 

5. What does the Ranker do in a text generation system?
Ans: It evaluates and prioritizes the information retrieved by the Retriever. 

Test: Skill Check: Build an LLM Application using OCI Generative AI Service

1. How are chains traditionally created in LangChain?
Ans: Using Python classes, such as LLM Chain and others 

2. What is the purpose of memory in the LangChain framework?
Ans: To store various types of data and provide algorithms for summarizing past interactions 

3. What is LCEL in the context of LangChain Chains?
Ans: A declarative way to compose chains together using LangChain Expression Language 

4. What is the function of "Prompts" in the chatbot system?
Ans: They are used to initiate and guide the chatbot's responses. 

5. How are prompt templates typically designed for language models?
Ans: As predefined recipes that guide the generation of language model prompts 

Oracle Cloud Infrastructure 2023 AI Foundations Associate (1Z0-1122-23) Test

Oracle Cloud Infrastructure 2023 AI Foundations Associate (1Z0-1122-23) Sample Test

AI foundation:

Skill Check: Module 1: AI Basics---
1. Which task is an example of a speech-related AI task?
Ans: Speech-to-text conversion

2. Which is NOT an example of vision or image-related AI task?
Ans: Image Compression 

3. Which task is a Generative AI task?
Ans: Writing a poem based on a given theme 

4. Which machine learning approach would have an autonomous driving agent trained to make driving decisions by receiving rewards or penalties based on its actions?
Ans: Reinforcement Learning 

5. Which type of Machine Learning algorithms extract trends from data?
Ans: Unsupervised Machine Learning 

Skill Check: Module 2: Machine Learning Foundation

1. What is a key characteristic of logistic regression?
Ans: Logistic regression fits an S-shaped curve to the data. 

2. Which type of Machine Learning algorithm learns from outcomes to make decisions?
Ans: Reinforcement Learning 

3. Which application does NOT require a Machine Learning solution?
Ans: Password Validation 

4. What type of Machine Learning algorithm is used when we want to predict the resale price on a residential property?
Ans: Regression 

5. Which type of learning is used in identifying fraudulent bank transactions?
Ans: Outlier analysis 

Skill Check: DL Basics
1. Which type of Recurrent Neural Network (RNN) architecture is used for Machine Translation?
Ans: Many-to-Many 

2. Which neural network has a feedback loop and is designed to handle sequential data?
Ans: Recurrent Neural Networks 

3. Which sequence model can maintain relevant information over long sequences?
Ans: Long Short-Term Memory Neural Networks 

4. Which essential component of Artificial Neural Network performs weighted summation and applies activation function on input data to produce an output?
Ans: Neuron 

5. How do hidden layers in neural networks help with character recognition?
Ans: By enabling the network to learn complex features such as edges and shapes 

Test: Skill Check: Generative AI

1. Which statement accurately describes generative AI?
Ans: Creates new content without making predictions 

2. What is "in-context learning" in the context of large language models (LLMs)?
Ans: Providing a few examples of a target task via the input prompt 

3. Sequence models are used to solve problems involving sequentially ordered data points or events. Which is NOT the best use case for sequence models?
Ans: Image classification and object recognition 

4. Fine-tuning is unnecessary for Large Language Models (LLMs) if your application does not involve which specific aspect?
Ans: Task specific adaptation 

5. Which aspect of Large Language Models significantly impacts their capabilities, performance, and resource requirements?
Ans: Model size and parameters, including the number of tokens and weights 


Skill Check: OCI AI Portfolio
1. Which OCI Data Science feature enables you to define and run repeatable Machine Learning tasks on fully managed infrastructure?
Ans: Jobs 

2. What is the primary value proposition of Machine Learning in Oracle Database?
Ans: Eliminates data movement, empowers users with Machine Learning, and offers a simpler architecture 

3. Which is NOT an Oracle Cloud Infrastructure AI service?
Ans: Translator 

4. What is the advantage of using OCI Superclusters for AI workloads?
Ans: Deliver exceptional performance and scalability for complex AI tasks 

5. Which OCI Data Science feature allows you to use catalogued models as HTTP endpoints on fully managed infrastructure?
Ans: Model Deployments

Test: Skill Check: OCI AI Services
1. What types of data are commonly used for the OCI Anomaly Detection service?
Ans: Time-Series

2. Which language is NOT supported by the OCI Speech service?
Ans: Mandarin

3. Which OCI AI service is used to extract tabular content from documents?
Ans: Document Understanding

4. Which capability of OCI Vision service uses a bounding box inside an image?
Ans: Object Detection

5. Which capability is offered by the OCI Language service?
Ans: Text Sentiment Analysis

Test: 1Z0-1122-23 - Oracle Cloud Infrastructure 2023 AI Foundations Associate

OCI AI Foundations: Practice Exam

1. Which is NOT a part of Oracle Responsible AI guidelines?
Ans: Ensuring equality

2. Which type of machine learning algorithm is used in predicting house prices?
Ans: Supervised Regression

3. What is the purpose of the self-attention mechanism in Transformer-based models?
Ans: To model dependencies between different elements in a sequence

4. An online bank wants to streamline the loan approval process. They have historical data on past loan applicants, including information on applicants' credit score, annual income, employment status, and whether they repaid the loan or defaulted.

Which machine learning algorithm can be used for this application?
Ans: Supervised Machine learning for classification

5. Which AI domain is primarily associated with the task of detecting and recognizing faces in images or videos?
Ans: Vision

6. What is the primary problem associated with vanishing gradients in Recurrent Neural Networks (RNNs)?
Ans: RNNs struggle to handle long sequences of data.

7. What is the goal of prompt engineering in the context of Large Language Models?
Ans: Crafting of specific instructions or queries for the model

8. When preparing data for a Machine Learning model, what are typically considered as input features?
Ans: Attributes that provide information for making predictions

9. Which AI domain can be used in the detection of fraudulent transactions?
Ans: Anomaly Detection

10. What is the primary role of Graphics Processing Units (GPUs) in modern computing?
Ans: Accelerating graphics rendering and parallel processing

11. Which component of feedforward neural network is responsible for processing input data and forwarding it through various layers to make predictions?
Ans: Input Layer

12. What is OCI Document Understanding primarily used for?
Ans: Automating document processing tasks

13. What is the primary capability of the OCI Language service?
Ans: Process unstructured data and extract insights

14. Which deep learning architecture is well-suited for processing sequential data such as sentences?
Ans: Recurrent Neural Network (RNN)

15. Which tasks uses Generative AI?
Ans: Video generation

Oracle AP Supplier Extract Query

 SELECT hp.party_name supplier,
ps.party_id supplier_ID,
Initcap(ps.vendor_type_lookup_Code) supplier_type,
DECODE(hp.status,'A','Active','Inactive' ) status,
TO_CHAR(ps.end_date_active,'dd-mm-yyyy') Inactivation_Reason,
TO_CHAR(ps.creation_date,'dd-mm-yyyy') creation_date,
ps.created_by,
ps.segment1 supplier_number,
zxptp.rep_registration_number Tax_Registration_Num,
    psp.income_tax_id  Tax_Payer_ID,
    zxptp.tax_classification_code Tax_Code,
    NULL Related_Party,
ps.business_relationship  Relationship_with,
    NULL Relationship_Type,
ps.organization_type_lookup_code Tax_Organization_Type,
NULL Classification,
NULL Status2,
NULL Certifying_Agency,
NULL Certificate,
TO_CHAR(psam.effective_start_date,'dd-mm-yyyy') start_date,
TO_CHAR(psam.effective_end_date,'dd-mm-yyyy') expiration_date,
NULL Attachment_Title,
NULL Attachment,
    TO_CHAR(psam.effective_end_date,'dd-mm-yyyy')   Expiration_Date2,
    hp.ATTRIBUTE2             DFF,
    TO_CHAR(psam.effective_start_date,'dd-mm-yyyy')  Start_Date2,
      NULL        Attachment2,
    hop.DUNS_NUMBER_C License_CR_Number,
----Supplier--------
hps.party_site_name Address_Name,
hp.city ,
hp.county,
Fax,
Phone,
TO_CHAR(ps.end_date_active,'dd-mm-yyyy') Inactive_Date,
--ps.customer_num,
--ps.standard_industry_class sic,
--hop.party_number Registry_id,
--hop.year_established,
--hop.mission_statement,
---Supplier Site---
pssm.vendor_site_code site,
hps.party_site_name site_Address_Name,
(hp.address1||','|| hp.address2||','|| hp.city||','||hp.state||','||hp.county) Site_Addresses,
    decode(hp.status,'A','Active','Inactive' ) site_status,
TO_CHAR(hps.end_date_active,'dd-mm-yyyy') Site_Inactive_Date,
    DECODE(pssm.hold_flag,'N','No','Yes') Hold,
pssm.purchasing_hold_reason Hold_Reason,
(SELECT Segment1 ||'.'||Segment2 ||'.'||Segment3||'.'||Segment4||'.'||Segment5||'.'||Segment6||'.'||Segment7||'.'||Segment8||'.'||Segment9||'.'||Segment10 Pre_Dist
       FROM gl_code_combinations
      WHERE code_combination_id = psam.prepay_code_combination_id)  PrepaymentDistribution,
(SELECT Segment1 ||'.'||Segment2 ||'.'||Segment3||'.'||Segment4||'.'||Segment5||'.'||Segment6||'.'||Segment7||'.'||Segment8||'.'||Segment9||'.'||Segment10 Liab_dist
       FROM gl_code_combinations
      WHERE code_combination_id = psam.accts_pay_code_combination_id ) Liability_Distribution,
NULL WithholdingTaxGroup,
---Supplier Site Contact---
    hp_contact.person_first_name first_name,
    hp_contact.person_last_name last_name, 
hp_contact.primary_phone_number contact_phone,
hp_contact.email_address contact_email,
NULL Contact_Inactive_Date,
(hp_contact.address1||','||hp_contact.address2||hp_contact.city ||','|| hp_contact.state||','|| hp_contact.county) Contact_Addresses
FROM poz_suppliers ps,
hz_parties          hp ,
    hz_organization_profiles hop,
    poz_suppliers_pii   psp,
    hz_party_sites      hps,
    hz_parties          hp_contact,
    fusion.zx_party_tax_profile zxptp,
    poz_supplier_sites_all_m pssm,
poz_site_assignments_all_m psam
WHERE hp.party_id = ps.party_id
AND  hop.party_id = ps.party_id
AND  psp.vendor_id(+) = ps.vendor_id
AND  hps.party_site_id(+) = hp.iden_addr_party_site_id
AND  hp_contact.party_id(+) = hp.preferred_contact_person_id
AND  zxptp.party_id(+) = ps.party_id
AND  ps.vendor_id      = pssm.vendor_id
AND  pssm.vendor_site_id = psam.vendor_site_id
AND  hp.party_name = '&Supplier_Name' -- Comment out for all Supplier