Skip to content

Set Up RAG for Your Content Library

⏱ 30 minutes intermediate
📜CoreOpalCMP

By the end of this tutorial, you will have:

  • Enabled RAG for your Opal instance
  • Connected your CMP content library as a data source
  • Tested retrieval accuracy with real queries
  • Configured agents to use retrieved content in their responses

Without RAG, Opal generates responses from its general training data. With RAG, Opal searches your campaigns, assets, briefs, and metadata before responding — producing output that reflects your brand, your data, and your current work.

Ensure you have:

  • Opal Administrator role — RAG configuration requires admin-level access in Opti ID
  • CMP with content — Your CMP instance should have published campaigns, tasks, and assets. RAG retrieves from existing data, so an empty CMP will produce no results.
  • RAG enabled by Optimizely — Your Customer Success Manager must activate RAG for your organization before you can configure it

Before configuring RAG, confirm your environment is ready.

  1. Log into home.optimizely.com and select your organization
  2. Navigate to Opal > Settings
  3. Confirm you see a RAG Configuration section. If it is missing, contact your Customer Success Manager to enable RAG for your account.
  4. Navigate to your CMP instance and confirm you have published content (campaigns, tasks, assets, or briefs)

Expected result: The RAG Configuration section is visible in Opal Settings, and your CMP contains content to index.

Activate RAG so Opal begins building its index of your content.

  1. In Opal > Settings > RAG Configuration, toggle Enable RAG to on
  2. Review the data processing consent — RAG indexes your CMP content within Optimizely’s secure infrastructure
  3. Confirm activation

The initial indexing process runs in the background. Depending on the size of your content library, this can take minutes to hours.

Expected result: RAG status shows “Indexing” or “Active.” Your CMP content is being processed into the unified content graph.

Tell Opal which parts of your CMP content to index.

  1. In RAG Configuration, click Data Sources
  2. Select Content Marketing Platform
  3. Choose which workspaces to include:
    • All workspaces — Index everything across your CMP
    • Selected workspaces — Choose specific workspaces to limit scope
  4. Save your data source configuration

Limiting to specific workspaces is useful when you have development or test workspaces that should not influence Opal’s responses.

Expected result: Your selected CMP workspaces appear as connected data sources with an indexing status.

Control which types of CMP content Opal can retrieve.

  1. In Data Sources > CMP, click Content Types
  2. Enable or disable indexing for each content type:
Content typeWhat it includesWhen to enable
CampaignsCampaign names, descriptions, timelines, goalsWhen agents need campaign context
TasksTask details, assignments, status, commentsWhen agents need workflow context
AssetsImages, documents, videos with metadata and descriptionsWhen agents need to reference or find media
BriefsCreative briefs, content briefs, strategy documentsWhen agents need strategic context
Labels and tagsTaxonomy data applied to contentWhen agents need to filter by category
  1. Save your content type selections

Expected result: Only the content types you selected are marked for indexing. Unselected types are excluded from retrieval.

With RAG active and content indexed, test whether Opal retrieves relevant content from your library.

  1. Navigate to Opal > Chat
  2. Ask a question that can only be answered from your CMP data:
What campaigns are currently active for Q2?
  1. Check the response for:

    • Specificity — Does Opal reference your actual campaign names, dates, and goals?
    • Source attribution — Does the response indicate which CMP data it retrieved?
    • Accuracy — Do the facts match what is in your CMP?
  2. Try additional queries that test different content types:

Find assets tagged for the spring product launch.
What does the content brief say about our target audience for
the rebrand campaign?

Expected result: Opal returns responses that reference your actual CMP data — specific campaign names, real asset descriptions, and accurate dates.

Systematic validation catches issues that ad-hoc testing might miss.

  1. Prepare 5-10 test queries covering different content types and workspaces
  2. For each query, note the expected answer based on what you know is in CMP
  3. Run each query in Opal Chat and compare the response to your expected answer
  4. Score each response:
ScoreMeaning
CorrectResponse matches CMP data accurately
Partially correctResponse references real data but misses key details
IncorrectResponse contains fabricated information or wrong data
No retrievalResponse is generic and does not reference CMP data
  1. If you see “Incorrect” or “No retrieval” results:
    • Verify the content exists in an indexed workspace
    • Confirm the content type is enabled in Step 4
    • Check that indexing has completed (status shows “Active,” not “Indexing”)

Expected result: At least 80% of your test queries return correct or partially correct results. Remaining issues are typically caused by unindexed content or ongoing indexing.

RAG becomes most powerful when your custom agents access retrieved content as part of their workflow.

  1. Navigate to Opal > Agents > Your Agents
  2. Select an agent you want to enhance with RAG (or create a new one)
  3. In the agent’s Instructions, add guidance for how the agent should use retrieved content:
## Context Usage
When answering questions about our campaigns or content:
1. Search the content library for relevant campaigns, assets, and briefs
2. Reference specific campaign names, dates, and goals from retrieved data
3. If no relevant content is found, state that clearly rather than
generating assumptions
4. Always cite which campaign or asset you are referencing
  1. In the agent’s Tools, ensure content retrieval tools are enabled
  2. Save the agent configuration
  3. Test the agent in Chat with a query that requires CMP context

Expected result: The agent uses your CMP data to produce grounded, specific responses instead of generic content.

RAG performance depends on the freshness and quality of your indexed content. Set up ongoing monitoring.

  1. Navigate to Opal > Settings > RAG Configuration
  2. Review the Index Status dashboard:
    • Last indexed — When the most recent indexing run completed
    • Content count — How many items are indexed by content type
    • Retrieval rate — How often queries successfully retrieve relevant content
  3. Schedule regular reviews (weekly or monthly):
    • Re-run your validation queries from Step 6
    • Check that newly published CMP content appears in retrieval results
    • Review agent outputs for accuracy drift

Expected result: Ongoing visibility into retrieval quality. Index updates reflect new CMP content as it is published.

You now have a working RAG configuration that:

  • Connects Opal to your CMP content library
  • Indexes campaigns, assets, briefs, and tasks
  • Enables agents and Chat to produce responses grounded in your real data
  • Respects permission-aware access controls
  • Is monitored for ongoing accuracy
  • Build agents that leverage RAG — Create specialized agents that reference your content library for campaign planning, asset discovery, and content generation
  • Expand data sources — As additional product integrations become available, add them to your RAG configuration
  • Train your team — Share the RAG-enabled agent with team members and gather feedback on response quality
  • Refine instructions — Use real-world feedback to improve how agents use retrieved content