Skip to content

Retrieval-Augmented Generation (RAG)

intermediate
📜CoreOpal

Large language models are trained on general knowledge. When you ask Opal about your campaigns, your approved messaging, or your latest assets, the model has no inherent access to that data. Without a bridge between the AI and your organization’s content, Opal can only generate generic responses that may be outdated or off-brand.

Retrieval-augmented generation (RAG) is that bridge. It enables Opal to search your organization’s data — campaigns, tasks, assets, and metadata — before generating a response. The result is output that reflects your actual content, not generic assumptions.

RAG follows a three-step process:

  1. Retrieval — When you make a request, Opal searches vector databases and keyword indexes to find information relevant to your query. This search spans structured data (campaign metadata, task status) and unstructured data (document text, image descriptions).

  2. Processing — The retrieved data is analyzed and contextualized. Opal determines which pieces of information are most relevant and how they relate to your request.

  3. Generation — The AI generates a response using the retrieved context. Because the response is grounded in your actual data, it is accurate, current, and aligned with your brand.

Opal’s RAG implementation goes beyond simple document search. It uses several components that work together:

Your campaigns, tasks, assets, and permissions are modeled as nodes and edges in a content graph. This structure preserves the relationships between items — a campaign contains tasks, tasks reference assets, assets have labels and metadata. Opal queries this graph to understand not just individual items but how they connect.

RAG in Opal searches across multiple content types:

  • Text — Document content, campaign descriptions, task notes
  • PDFs — Uploaded briefs, guidelines, reports
  • Images — Visual assets with metadata and AI-generated descriptions
  • Video — Video content with transcriptions and metadata
  • Metadata — Tags, labels, dates, status fields, and custom properties

Both vector search (semantic similarity) and keyword search (exact matching) are used to find the most relevant content.

RAG respects your organization’s access controls at two levels:

  • Query-level filters — Searches are scoped to content the requesting user has permission to see
  • Post-query verification — Results are verified against permissions before being included in the response

This means a user cannot accidentally surface content they should not have access to, even through natural language queries.

You do not need to learn a query language. The LLM translates your natural language request into optimized graph queries. Ask “What assets are tagged for our spring campaign?” and Opal constructs the appropriate search across your content graph.

RAG is particularly valuable when your organization needs to:

  • Maintain brand consistency — AI responses reference your approved messaging and brand guidelines rather than inventing new language
  • Create personalized content — Pull customer segment data and product information to tailor messaging
  • Scale content creation — Generate blogs, emails, ads, and social content grounded in your existing campaign data
  • Ensure compliance — Reference approved legal language and regulatory guidelines stored in your content system
  • Find existing assets — Query your DAM by tags, descriptions, or content to locate assets for reuse

RAG delivers high value in industries where accuracy and compliance are critical: financial services, healthcare, retail, and enterprise marketing.

RAG processes data internally through Optimizely’s secure infrastructure:

  • Enterprise-grade security controls
  • Permission-aware access at query and result levels
  • Managed data synchronization
  • GDPR compliance readiness
  • No external data sharing — your content stays within Optimizely’s systems