Using Retrieval Augmented Generation (RAG)
Retrieval-Augmented Generation (RAG) in Siebel CRM operates in two phases, design time and run time. During the design-time phase, data is processed, prepared, and indexed for efficient retrieval. During the run-time phase, the user's query is enhanced with relevant context retrieved from the indexed data, enabling the system to generate a more accurate and contextual response.
Design Time for RAG
To prepare data for RAG at design time:
- Identify the source data required by the AI system. This may include unstructured content such as documents, files, and attachments, as well as structured data stored in systems like Siebel databases.
- Prepare unstructured content by cleaning, segmenting, and chunking it into manageable pieces. Applying overlapping chunks can improve retrieval accuracy, particularly for lengthy documents.
- Generate vector embeddings for the processed content using the same embedding model that will be employed during runtime query processing.
- Store the generated embeddings in the designated vector repository. For cloud deployments, use Oracle Database 23ai Vector Search or OCI Knowledge Bases; for on-premises deployments, use Siebel OpenSearch.
- For structured Siebel data, retain key attributes such as Id, Status, Priority, Date, Account, and Revenue as metadata or filtering criteria. Only descriptive fields, such as Summary and Description, should be converted into text for embedding generation.
- Optionally, extract entities and relationships from both structured and unstructured data sources to enable graph-based retrieval and enhance relationship-aware search capabilities.
Run Time for RAG
To process a query using RAG at runtime:
- Initiate a query or prompt from a user, business service, workflow, script, API, or assistant.
- Convert the query into an embedding using the same embedding model employed during the design phase.
- Perform a similarity search against the vector store to identify the most relevant content. In on-premises deployments, OpenSearch uses hybrid search with configurable weighting. In cloud deployments, RAG uses the OCI RAG Agent chat workflow.
- Combine the retrieved content with the original query to enrich the prompt with relevant context.
- Submit the enhanced prompt to the selected large language model (LLM), such as
an OCI Generative AI model or another configured LLM.
The LLM generates a response, which is returned to the originating channel, including the Siebel UI, workflow, business service, eScript, REST API, or any custom application that initiated the request.
Prerequisites
Make sure you the following prerequisites are met:
- OCI AI Services and Generative AI Services configuration must be completed and validated.
- The
ociconfig.propertiesfile must be present in the internal Tomcat webapps directory and configured with the required OCI parameters, including tenancy, user, fingerprint, region, compartment, and private key file information. - When the KnowledgeBaseType parameter is set to OpenSearch, OpenSearch must be installed, configured, and operational.
- All data categories and business components intended for search must be enabled for indexing, and the initial Index or Index All process must have completed successfully.
- Required Siebel seed data, business services, applets, views, manifest files, and repository objects must be available in the environment or migrated prior to deployment.
- End users and administrators must have the necessary access privileges to applicable views, buttons, business services, and any newly introduced AI or RAG-related business services.