Adding Data with Custom URL to an Object Storage Bucket
Create an Object Storage bucket and upload source files for RAG responses in OCI Generative AI Agents. Optionally, add a custom URL to each file for citation.
- In the navigation bar of the Console, select a region that hosts Generative AI Agents, for example, US Midwest (Chicago). If you don't know which region to select, see Regions with Generative AI Agents.
- Open the navigation menu and select Storage. Under Object Storage & Archive Storage, select Buckets.
-
Select the compartment in which you want to create a bucket or the compartment that contains the bucket that you want to use. You must already have the following permission to add Object Storage resources to this compartment.
allow group <your-group-name> to manage object-family in compartment <compartment-with-bucket>
-
To create a bucket follow these steps:
- Select Create Bucket.
- Enter a name unique to your region for the bucket.
- For other fields, select the Learn more links and then select options that apply to your data. Also see Creating an Object Storage Bucket.
-
Select Create.
By default, a new bucket is private. You can change the visibility of a bucket after you create it.
- Select the name of the bucket that you want to use.
- On the bucket details page, under Objects, select Upload.
- (Optional)
Select Show Optional Headers and Metadata and then select and enter the following values.
- Type: Metadata
- Name:
customized_url_source
- Value: <Custom-URL-for-the-file>
Important
For the citation link override to work, you must use Name:customized_url_source
. If you don't want the agent to return a custom URL in its citations, skip this step. -
Add one or more files for the data source and select Upload.
Note
If you added thecustomized_url_source
metadata to an object in step 7, this custom URL applies to all the files that you upload for this object. You can't update themetadata
property of existing objects. Instead, you can copy a file, add a new metadata to that file, and then delete the old file. To add or update a file with thecustomized_url_source
metadata, using OCI CLI, see Assigning a Custom URL to a Citation.