Adding a RAG Source
This guide walks through configuring a new RAG source in your project using the RAG Editor.
Opening the RAG Editor
- Click RAG Sources in the left sidebar.
- Click New RAG Source.
- The RAG Editor opens (full-page, no modals).
RAG Editor Sections
Section 1: Identity
| Field | Description |
|---|---|
| Name | Short identifier: company-docs, product-kb, security-policies |
| Description | What's in this RAG source: "Company product documentation from Confluence" |
| Icon | Emoji for visual identification |
Section 2: Provider
Select your vector database provider from the dropdown. The form below updates to show the required fields for that provider.
Section 3: Connection Config
Fields vary by provider. See Providers for the full field list per provider.
Common fields across all providers:
- API Key / Credentials — Authentication for your vector DB
- Index / Collection Name — Which index to query
- Namespace (Pinecone) — Which namespace within the index
Section 4: Query Config
| Field | Default | Description |
|---|---|---|
| Top-K | 3 | How many chunks to retrieve per query. More = more context but more tokens. |
| Score Threshold | 0.7 | Minimum similarity score (0-1). Results below this threshold are excluded. |
| Metadata Fields | — | Which metadata fields to include with retrieved chunks (source URL, title, date) |
Section 5: Test Connection
Before saving, test the connection:
- Click Test Connection.
- TARX attempts to connect to your vector DB.
- Sends a test query (embedded version of "test").
- Reports:
- ✅ Connection successful — shows document count in the index
- ❌ Connection failed — shows error (auth failure, wrong endpoint, etc.)
Step-by-Step: Adding Pinecone
- Select Pinecone as provider.
- Enter:
- API Key: Your Pinecone API key (from Pinecone Console → API Keys)
- Environment: Your Pinecone environment (e.g.,
us-east1-gcp) - Index Name: The name of your Pinecone index (e.g.,
product-docs) - Namespace: (optional) specific namespace, or leave empty for default
- Set Top-K = 3 (adjust based on your use case)
- Set Score Threshold = 0.7
- Click Test Connection — verify it connects and shows your document count.
- Click Save.
Step-by-Step: Adding Azure AI Search
- Select Azure AI Search as provider.
- Enter:
- Endpoint:
https://your-search-service.search.windows.net - API Key: Your Azure AI Search Admin or Query key
- Index Name: The name of your search index (e.g.,
product-docs-index) - Semantic Config: (optional) If using semantic ranking, enter the semantic configuration name
- Endpoint:
- Set Top-K and Score Threshold.
- Click Test Connection.
- Click Save.
Saving and Assigning
After saving, the RAG source appears in your project's RAG Sources list. To use it:
- Open an Agent in the Agent Editor.
- Go to Section 6: RAG Sources.
- Click Add RAG Source.
- Select your newly created source from the dropdown.
- Set the per-agent Top-K (overrides the default).
- Save the agent.
API Key Encryption
Like LLM API keys, RAG source credentials are:
- Encrypted at rest before storage
- Stored securely in TARX with
config.api_keyencrypted - Never returned by the API after creation
- Decrypted in-memory only at query time
Editing a RAG Source
- Click RAG Sources in the sidebar.
- Click the RAG source to open the editor.
- Make changes.
- Click Save.
You cannot change the provider after creation (creates a new RAG source instead).
Deleting a RAG Source
- In the RAG Sources list, click the three-dot menu (⋯) on the source.
- Click Delete.
- Confirm.
Deleting a RAG source that agents reference removes the retrieval for those agents. The agents continue to work but without the RAG enrichment. Update the agent's RAG sources after deletion.