Skip to main content

Adding a RAG Source

This guide walks through configuring a new RAG source in your project using the RAG Editor.


Opening the RAG Editor

  1. Click RAG Sources in the left sidebar.
  2. Click New RAG Source.
  3. The RAG Editor opens (full-page, no modals).

RAG Editor Sections

Section 1: Identity

FieldDescription
NameShort identifier: company-docs, product-kb, security-policies
DescriptionWhat's in this RAG source: "Company product documentation from Confluence"
IconEmoji 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

FieldDefaultDescription
Top-K3How many chunks to retrieve per query. More = more context but more tokens.
Score Threshold0.7Minimum similarity score (0-1). Results below this threshold are excluded.
Metadata FieldsWhich metadata fields to include with retrieved chunks (source URL, title, date)

Section 5: Test Connection

Before saving, test the connection:

  1. Click Test Connection.
  2. TARX attempts to connect to your vector DB.
  3. Sends a test query (embedded version of "test").
  4. Reports:
    • Connection successful — shows document count in the index
    • Connection failed — shows error (auth failure, wrong endpoint, etc.)

Step-by-Step: Adding Pinecone

  1. Select Pinecone as provider.
  2. 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
  3. Set Top-K = 3 (adjust based on your use case)
  4. Set Score Threshold = 0.7
  5. Click Test Connection — verify it connects and shows your document count.
  6. Click Save.
  1. Select Azure AI Search as provider.
  2. 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
  3. Set Top-K and Score Threshold.
  4. Click Test Connection.
  5. Click Save.

Saving and Assigning

After saving, the RAG source appears in your project's RAG Sources list. To use it:

  1. Open an Agent in the Agent Editor.
  2. Go to Section 6: RAG Sources.
  3. Click Add RAG Source.
  4. Select your newly created source from the dropdown.
  5. Set the per-agent Top-K (overrides the default).
  6. 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_key encrypted
  • Never returned by the API after creation
  • Decrypted in-memory only at query time

Editing a RAG Source

  1. Click RAG Sources in the sidebar.
  2. Click the RAG source to open the editor.
  3. Make changes.
  4. Click Save.

You cannot change the provider after creation (creates a new RAG source instead).


Deleting a RAG Source

  1. In the RAG Sources list, click the three-dot menu (⋯) on the source.
  2. Click Delete.
  3. Confirm.
Agents using this source will be affected

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.