Integrating OCI Generative AI with other OCI services — it is the difference between a smart tool that sits on a shelf and a smart tool that completely transforms your business operations. For the 1Z0-1127 exam, you must understand not just what Generative AI can do alone, but how it plugs into databases, search engines, and data processing pipelines to build real, working applications.
Jump to a section
A simple way to picture Integrating OCI Generative AI with Other Services
Have you ever watched a professional kitchen during a busy dinner service and wondered how every plate arrives at the right table, at the right temperature, at the right time?
The head chef calls out orders, but they don't cook everything themselves. They rely on a brigade: the sous chef preps vegetables, the pastry chef handles desserts, the grill cook sears steaks, and the expediter checks every plate before it goes out. Each station has its own specialty, and they communicate constantly through a system of tickets, timers, and hand signals.
In this kitchen, the head chef is your application, trying to create a personalised menu (a report, a chatbot answer, or an analysis). The sous chef is OCI Database, holding all the stored recipes and past orders (customer data). The grill cook is OCI Search, quickly finding the best matching ingredients (documents or records) from a huge pantry. The pastry chef is OCI Generative AI, which can take those ingredients and create something new, like a custom dessert recommendation. The expediter is OCI Data Flow, which orchestrates the entire process, ensuring the order flows correctly and on time. Without this integrated kitchen brigade, the head chef would have to run between each station, waste time hunting for ingredients, and risk burning the steak. The integration between OCI services is exactly this choreographed dance, where each service does what it does best and passes the result to the next, all without you having to write a million separate instructions.
Generative AI models are incredibly powerful, but in isolation, they are like a brain with no senses — they can't access your specific data, your company's knowledge base, or the real-time information needed to give accurate answers.
OCI Generative AI service provides large language models (LLMs) — that is, AI models trained on vast amounts of text to understand and generate human-like language. When you send a prompt (a question or instruction), the model generates a completion (its answer). However, if you ask it "What is the status of order 1043?", a standalone LLM has no idea. It has never seen your order database.
This is where integration becomes crucial. You connect the Generative AI service to other OCI services using APIs (Application Programming Interfaces) — think of an API as a secure pipeline for sending data and commands between two services. When your application needs an answer that involves company data, it does not just forward the question to the LLM. Instead, it first queries OCI Database (like Oracle Autonomous Database or MySQL Database Service) to pull the specific order record, then it sends that record to the LLM so the LLM can generate a coherent, personalised answer.
OCI Search (OpenSearch) works similarly. Imagine a company with thousands of internal policy documents. A user asks, "What is our leave policy for new parents?" Without integration, the LLM would guess or make something up — this is called hallucination. With integration, the application first uses OCI Search to retrieve the most relevant policy documents from an index (a catalogue of searchable data), then feeds those documents into the prompt as context. The LLM then generates an answer based on that context, a technique known as Retrieval-Augmented Generation or RAG. This makes answers factual and grounded in your own data.
OCI Data Flow is a serverless Apache Spark service — Spark is a technology for processing huge quantities of data very quickly. You use it when you have massive datasets that need cleaning, transforming, or analysing before being fed into the AI. For example, you might have terabytes of customer reviews. Data Flow can process those reviews, extract common themes, and create a structured summary. That summary is then sent to the Generative AI service to generate a report in natural language. The serverless part means you do not manage any servers — you just upload your processing code (written in Java, Scala, or Python), and OCI runs it automatically, scaling resources up or down as needed.
Other services include OCI Object Storage, which is like an infinite virtual filing cabinet. You might store all your training documents there, and when a search query comes in, the application retrieves them from Object Storage and pushes them through OCI Search and then to the LLM. The key point is that each integration solves a specific problem:
OCI Database integration grounds the AI in your transactional data (orders, customer records).
OCI Search integration grounds the AI in your unstructured documents (PDFs, web pages).
OCI Data Flow integration allows the AI to work with very large, complex datasets without crashing.
OCI Object Storage integration provides a central repository for the data being searched and generated.
In practice, all these services communicate through the OCI network, secured by IAM (Identity and Access Management) policies that control who can call which API. You typically orchestrate the workflow using OCI Functions (serverless code snippets) or a managed workflow service like OCI Data Integration.
The big benefit is efficiency. Instead of building a custom application from scratch to do all these tasks — retrieving data, searching documents, processing big data, and generating language — you simply connect pre-built, managed services. This reduces development time, reduces operational complexity, and means each piece is maintained by Oracle's cloud team, not your own IT staff. For the 1Z0-1127 exam, remember that integration is the secret ingredient that turns a generic chatbot into a private, knowledgeable, and trustworthy corporate assistant.
Identify the Data Source
Determine where the data the AI needs lives. Is it in a database (structured), in documents (unstructured), or in huge files? This decides whether you use OCI Database, OCI Search, or OCI Data Flow.
Retrieve the Relevant Data
Use the appropriate OCI service to fetch data. For a database, run a SQL query via OCI Database. For documents, query OCI Search. For large datasets, run a Spark job on OCI Data Flow.
Prepare the Data for the AI
The retrieved data may need to be formatted into a text prompt. This step often happens in OCI Functions or your application code. You combine the user's question with the retrieved data into a structured string that the LLM can understand.
Call the OCI Generative AI Service
Send the prepared prompt to the OCI Generative AI API. The API returns a completion — the AI's generated text. You must ensure your application handles potential errors like timeouts or content filtering.
Post-process and Return the Answer
Take the AI's response and optionally store it for auditing in OCI Object Storage. Then present it to the user in your application. This final step makes the integration useful in a real business setting.
Let's walk through a realistic scenario: a large insurance company using OCI to build an automated claims processing assistant.
The company receives thousands of claims every day. Each claim includes a description of the incident, uploaded photos, police reports (stored as PDFs in OCI Object Storage), and the claimant's policy details (stored in OCI Database). An IT professional would need to design a system that, when a claims handler submits a claim ID, automatically produces a draft summary of the claim and flags any missing information.
The first step is to use OCI Data Flow. The IT professional writes a Spark program that reads the previous six months of claim data from Object Storage, cleans it (removing duplicates, fixing dates), and produces a structured dataset. This dataset is stored in OCI Data Flow's output directory. This is the foundational data pipeline.
Next, they configure an application that triggers when a new claim is submitted. The application code (running in OCI Functions) performs these actions:
It pulls the policy details from OCI Database using a SQL query.
It searches Object Storage for associated PDF documents using OCI Search (OpenSearch) by indexing the document names and metadata.
It retrieves the most relevant documents' text content.
It constructs a prompt that contains the policy details, the document excerpts, and the claim description.
It sends this prompt to the OCI Generative AI service's LLM.
It receives the generated summary and returns it to the claims handler's screen.
The IT professional also sets up monitoring and logging using OCI Logging, so they can see how long each step takes and trace any errors. They implement IAM policies to ensure only authorised claims handlers can access the AI service and the underlying data.
The result is that a task which used to take a claims handler 20 minutes per claim (reading documents, typing a summary) is now done by the AI in 30 seconds, with the human simply reviewing and approving. The IT professional does not need to manage servers, build custom search engines, or maintain AI models — they only integrate OCI's managed services using APIs and a few hundred lines of orchestration code. This is the exact kind of architecture that the 1Z0-1127 exam expects you to understand conceptually.
The 1Z0-1127 exam tests your understanding of integration architecture, not the ability to write code. You will see scenario-based multiple-choice questions where you must select the correct combination of services for a given business requirement.
Exam question types include: - "Which OCI service should you use to provide the Generative AI model with relevant company documents to answer a user query?" (Answer: OCI Search, because it enables Retrieval-Augmented Generation). - "A company needs to process 10 terabytes of data before sending it to the Generative AI service. Which service should they use?" (Answer: OCI Data Flow, because it is designed for large-scale data processing). - "You need to store the input and output of the Generative AI service for auditing purposes. Which service would you use?" (Answer: OCI Object Storage, because it is durable and cost-effective for large volumes of data). - "Which service would you use to call the Generative AI API securely from an application without managing servers?" (Answer: OCI Functions, because it provides serverless compute).
The traps are subtle. A common trap is to confuse OCI Search with OCI Database. Beginners think "the AI needs my data" and jump straight to Database, but the exam often describes unstructured data — documents, web pages, PDFs — where Search is correct. Another trap is proposing a custom server instead of using managed services. The exam favours answers that use OCI's managed, serverless options because those are the basis of the exam's philosophy: less operational overhead.
Key definitions to memorise:
RAG (Retrieval-Augmented Generation): a pattern where you retrieve relevant information from a knowledge base (via Search or Database) and include it in the prompt to the LLM.
Prompt engineering: crafting the input to the LLM to get the best output. In integration, you dynamically build the prompt using data from other services.
Serverless: you do not manage servers; the cloud provider handles scaling and maintenance.
API: the interface that lets one service talk to another.
The exam loves to ask about the order of operations in a RAG pipeline. The correct order is: user question -> search for relevant documents (OCI Search) -> retrieve document text -> combine with prompt -> send to LLM (OCI Generative AI) -> return answer. Any option that skips the search step or puts it after the LLM call is wrong.
Finally, watch for questions about security: integration requires IAM policies to grant permissions between services. A question might ask "How do you allow OCI Functions to access OCI Database?" — the correct answer is to create an IAM policy that grants the necessary roles, not to hardcode credentials.
Generative AI models have no access to your private data unless you explicitly integrate them with OCI Database, OCI Search, or Object Storage.
Retrieval-Augmented Generation (RAG) is the pattern of retrieving relevant data from your own systems and including it as context in the prompt to the AI.
OCI Data Flow is used to process very large datasets (terabytes) before sending them to the AI, especially when data cleaning or transformation is needed.
OCI Search (OpenSearch) is ideal for finding relevant documents, while OCI Database is for structured transactional data like customer records.
The typical integration workflow in the exam is: user query -> retrieve data from Search/Database -> construct prompt -> send to Generative AI -> return answer.
IAM policies are required to grant permissions for one OCI service to call another — never hardcode passwords or tokens.
These come up on the exam all the time. Here's how to tell them apart.
OCI Database Integration
Used for structured data like tables and rows
Queries a specific record using SQL
Best for transactional data (orders, customers)
OCI Search Integration
Used for unstructured data like PDFs and emails
Searches through an index to find relevant documents
Best for knowledge bases and policy documents
OCI Data Flow
Processes massive datasets (terabytes) in parallel
Uses Apache Spark for transformations
Runs as a job, can take minutes or hours
OCI Functions
Handles short, event-driven tasks (light weight)
Runs a single piece of code in response to triggers
Runs in milliseconds to seconds
Retrieval-Augmented Generation (RAG)
Does not change the AI model, only adds context to the prompt
Fast to implement — no training needed
Keeps your private data out of the model's parameters
Fine-tuning a Model
Retrains the AI model on your data, changing its internal weights
Very slow and expensive — requires expertise
Your private data becomes part of the model
Mistake
You can just ask the Generative AI model directly for any company data because it learns everything during training.
Correct
Generative AI models only know what they were trained on, and that training data is public or purchased. They have no access to your private company data unless you explicitly integrate them with your database or search service.
People confuse AI models with search engines. They assume the model has 'memory' of everything, but LLMs are not designed to store live, private data.
Mistake
OCI Data Flow is just another way to run SQL queries on your database.
Correct
OCI Data Flow is a fully managed Apache Spark service for processing massive amounts of data in parallel, often semi-structured or unstructured data (like log files, CSV, JSON). It is not a database query tool — it is a data processing engine.
Both services handle data, so beginners lump them together. Data Flow handles transformation and cleaning at scale, while a database is for storage and retrieval.
Mistake
Using OCI Search means you must host your own search server cluster.
Correct
OCI Search (based on OpenSearch) is a managed service — Oracle handles the servers, scaling, backups, and patching. You just create an index and load data.
Many come from an on-premises background where they had to manage Elasticsearch clusters themselves. The exam tests your understanding of managed services.
Mistake
If the AI gives an incorrect answer, you should retrain the whole model on better data.
Correct
In an integrated system, you fix the answer by improving the data retrieval step — better search queries, updated documents, or more context in the prompt. Retraining a large language model is massive and rarely done for domain accuracy.
Retraining sounds like the obvious 'fix' but is impractical. The exam wants you to understand that integration provides a lighter-weight solution through RAG.
Mistake
All integrations must go through a single central API gateway for it to be secure.
Correct
OCI services can call each other directly using service-to-service APIs secured by IAM policies. An API gateway is optional and typically used when exposing services to external internet users, not for internal OCI service communication.
API gateways are popular in cloud architectures, but beginners over-apply them. The exam tests whether you know when they are necessary versus when direct service calls are fine.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
No, automatically connecting would be a security risk. You must explicitly build an integration using APIs and IAM policies to grant the AI service permission to access your database, and you control exactly which data is sent.
RAG stands for Retrieval-Augmented Generation. It is the pattern of retrieving your own data (via Search or Database) and including it in the prompt to the AI. It is important because it is the core integration pattern tested in 1Z0-1127.
OCI Search (OpenSearch) is for searching through unstructured documents like PDFs, emails, and web pages. OCI Database is for storing and querying structured data like customer records, orders, and inventory in tables.
No, OCI Data Flow is serverless. You upload your Spark code, and Oracle manages everything — the compute resources, scaling, and clusters. You only pay for the processing time you use.
You control this in your integration code. When you retrieve data from the database or search, you filter it based on user permissions before including it in the prompt. The AI itself has no user context unless you provide it.
Yes, OCI Functions is a common choice for orchestrating the workflow because it is serverless and can call all other OCI services via their APIs. You write short pieces of code (functions) that run in response to events.
You've finished Integrating OCI Generative AI with Other Services. Continue through the 1Z0-1127 study guide to build a complete picture of the exam.
Done with this chapter?