Skip to content

Commit 0fb4f8a

Browse files
Incorporated feedback
1 parent cbdb0e9 commit 0fb4f8a

File tree

3 files changed

+124
-66
lines changed

3 files changed

+124
-66
lines changed

src/content/docs/agentic-ai/knowledge-integration/overview.mdx

Lines changed: 43 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -17,50 +17,9 @@ To provide more context-specific answers, New Relic AI can use a technique calle
1717

1818
By setting up the New Relic AI knowledge connector, you can expect tangible outcomes such as faster incident resolution, more accurate and context-aware AI responses, and reduced manual searching across multiple documents. This unified approach helps your team make better decisions and respond to issues more efficiently.
1919

20-
## How it works
21-
22-
<img
23-
title="High-level visual of Knowledge connector"
24-
alt="High-level visual of Knowledge connector"
25-
src="/images/High-Level Visual Overview of the New Relic AI Knowledge Connector.webp"
26-
/>
27-
28-
Your content and knowledge bases, such as Confluence, are uploaded to the New Relic AI platform. The system follows a three-step process to provide a context-aware answer:
29-
30-
- **Index:** Once your knowledge bases are connected to the New Relic AI platform, the knowledge connector performs an initial indexing of your documents. You can configure this process to run on a recurring basis, ensuring that New Relic AI always has access to the most up-to-date information as your documents evolve.
31-
32-
- **Retrieval:** When you ask a question in New Relic AI, the system searches the indexed content for information relevant to your query. This step ensures that the context is pulled directly from your trusted, internal documentation.
33-
34-
- **Generation:** The system combines the retrieved information with the powerful generative capabilities of the underlying LLM. This synthesis produces a comprehensive and context-aware answer, grounded in your specific data and best practices.
35-
36-
If a query does not require your organizational knowledge, New Relic AI will generate an answer using the underlying LLM's vast general knowledge. In both cases, the goal is to provide you with the most relevant and accurate information possible.
37-
38-
## Key features
39-
With New Relic AI knowledge connector, you can:
40-
- Gain access to relevant context from your internal runbooks and documentation directly within New Relic AI, leading to quicker mean time to resolution (MTTR).
41-
- The answers provided are specific to your environment and based on your own best practices and historical data.
42-
- Easily find solutions to problems that have been solved before. Ask questions like:
43-
- "Who has resolved similar issues in the past?"
44-
- "What are the standard triage steps for this type of alert?"
45-
- "Show me the runbook for a `database connection limit exceeded` error."
46-
47-
## Data security and privacy
48-
49-
<Callout variant="important">
50-
51-
At this time, all indexed documents can be retrieved by all users within your organization's New Relic account. Please verify that only appropriate content is indexed, as there's currently no option to restrict access or redact information after indexing.
52-
53-
</Callout>
54-
55-
Before you begin indexing, ensure that:
56-
57-
* Only documents suitable for organization-wide access are indexed.
58-
* Sensitive information is redacted.
59-
* All the documents to be indexed comply with your organization's internal data security and privacy policies.
60-
6120
## Use cases and value
6221

63-
Here are some New Relic AI tools and a brief overview of how the knowledge connector integration adds value to each:
22+
The following examples show how the knowledge connector integration helps the New Relic AI tools tackle challenges like fragmented documentation, slow incident response, and missing business context by surfacing relevant information.
6423

6524
<CollapserGroup>
6625
<Collapser id="retro-docsearch-tool" title="Retro DocSearch">
@@ -99,12 +58,50 @@ The knowledge connector integration elevates the tool by giving it access to you
9958
</Collapser>
10059
</CollapserGroup>
10160

61+
## Key features
62+
With New Relic AI knowledge connector, you can:
63+
- Gain access to relevant context from your internal runbooks and documentation directly within New Relic AI, leading to quicker mean time to resolution (MTTR).
64+
- The answers provided are specific to your environment and based on your own best practices and historical data.
65+
- Easily find solutions to problems that have been solved before. Ask questions like:
66+
- "Who has resolved similar issues in the past?"
67+
- "What are the standard triage steps for this type of alert?"
68+
- "Show me the runbook for a `database connection limit exceeded` error."
69+
70+
<Callout variant="important">
71+
72+
At this time, all indexed documents can be retrieved by all users within your organization's New Relic account. Please verify that only appropriate content is indexed, as there's currently no option to restrict access or redact information after indexing.
73+
74+
</Callout>
75+
76+
## How it works
77+
78+
<img
79+
title="High-level visual of Knowledge connector"
80+
alt="High-level visual of Knowledge connector"
81+
src="/images/High-Level Visual Overview of the New Relic AI Knowledge Connector.webp"
82+
/>
83+
84+
The knowledge connector securely integrates with your content and knowledge bases, such as Confluence, to enhance New Relic AI's responses with your specific organizational knowledge. The process follows these steps:
85+
86+
- **Index:** Once your knowledge bases are connected to the New Relic AI platform, the knowledge connector performs an initial indexing of your documents. You can configure this process to run on a recurring basis, ensuring that New Relic AI always has access to the most up-to-date information as your documents evolve.
87+
88+
- **Retrieval:** When you ask a question in New Relic AI, the system searches the indexed content for the most relevant information. This step ensures that the context is pulled directly from your trusted, internal documentation.
89+
90+
- **Generation:** Finally, the system combines the retrieved information with the powerful generative capabilities of the underlying LLM. This synthesis produces a comprehensive and context-aware answer, grounded in your specific data and best practices.
91+
92+
If a query doesn't require your organizational knowledge, New Relic AI will generate an answer using the underlying LLM's vast general knowledge. In both cases, the goal is to provide you with the most relevant and accurate information possible.
93+
10294
## Prerequisites
103-
To begin using the New Relic AI knowledge connector:
104-
- **Enable New Relic AI:** Before you can configure the knowledge connector, New Relic AI must be enabled for your account.
105-
- **Configure user permissions for indexing:** To manage which users can index data sources (which may have future billing implications), you must grant the appropriate permissions. Users responsible for setting up and managing the knowledge connectors will need the “Org Product Admin” role.
10695

107-
You have two options to assign this role:
96+
Before you begin using the New Relic AI knowledge connector, ensure that:
97+
98+
- Only documents suitable for organization-wide access are indexed.
99+
- Sensitive information is redacted.
100+
- All the documents to be indexed comply with your organization's internal data security and privacy policies.
101+
- New Relic AI is enabled for your account.
102+
- Appropriate user permissions are configured for indexing (you'll need the “Org Product Admin” role, which allows you to perform actions—such as set up and manage the knowledge connectors—that may have future billing implications).
103+
104+
You have two options to assign the Org Product Admin role:
108105
- **Apply to an existing user group:** Add the Org Product Admin role to an existing group of users who will be responsible for managing the knowledge connectors.
109106
- **Create a dedicated group:** For more granular control, create a new user group specifically for this purpose and assign the Org Product Admin role to that group.
110107

src/content/docs/apis/nerdgraph/examples/nerdgraph-rag.mdx

Lines changed: 81 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "NerdGraph tutorial: Configure RAG Tools and Documents"
2+
title: "NerdGraph tutorial: Configure RAG tools and documents"
33
metaDescription: Enhance New Relic AI with RAG (Retrieval Augmented Generation)
44
redirects:
55
- /docs/agentic-ai/knowledge-integration/apis-and-communication-protocol
@@ -12,15 +12,22 @@ freshnessValidatedDate: never
1212
This feature is currently provided as part of a preview program pursuant to our [pre-release policies](/docs/licenses/license-information/referenced-policies/new-relic-pre-release-policy).
1313
</Callout>
1414

15-
With New Relic, you can enhance New Relic AI agents with RAG. This means that you can associate documentation, runbooks, incident retros, and even source code with your services, giving New Relic AI better insight into issues with your system.
15+
With New Relic, you can enhance New Relic AI agents with Retrieval Augmented Generation (RAG) by associating your documentation, runbooks, incident retros, and even source code with your services. This process gives New Relic AI better insight into issues with your system. The tutorial outlines how to obtain your organization ID, create a RAG tool, and add your documents to the platform using the Blob API.
16+
17+
After adding your documents, you will create a relationship to associate them with the RAG tool. You can then verify your configuration by querying the relationships between the RAG documents and the RAG tool. The final step is to query the RAG tool itself to retrieve relevant, indexed information.
1618

1719
To learn more about the knowledge connector, refer to [New Relic AI Knowledge connector](/docs/agentic-ai/knowledge-integration/overview).
1820

19-
## Get started with RAG [#get-started]
21+
To start indexing your content and benefit from the knowledge connector with New Relic AI, follow these mentioned steps:
22+
23+
<Steps>
24+
<Step>
2025

21-
<Collapser id ="get-org-id" title ="Obtain your organization ID">
26+
<Collapser id ="get-started" title ="Obtain your organization ID">
2227

23-
Before you begin, you'll need your organization ID to use with the following mutations and queries.
28+
Organization ID uniquely identifies your account and ensures that any RAG tool you create, documents you upload, or relationships you establish are associated with your organization in New Relic.
29+
30+
Organization ID is required to perform mutations and queries in NerdGraph when setting up and managing RAG tools and documents. Run the following query and keep the organization ID handy for later steps.
2431

2532
```graphql
2633
{
@@ -32,11 +39,20 @@ Before you begin, you'll need your organization ID to use with the following mut
3239
}
3340
```
3441
</Collapser>
35-
## Configure your RAG tool
36-
<CollapserGroup>
42+
</Step>
43+
44+
<Step>
3745
<Collapser id = "create-rag-tool" title = "Create a RAG tool">
3846

39-
The name and description of your RAG tool help the LLM understand when and how to use it. Provide a clear name and accurate description so that the LLM is more likely to select the right tool for a given prompt and provide relevant, context-aware responses.
47+
Before performing this step, ensure you have "Org Product Admin" permissions.
48+
49+
A RAG tool can be thought of as a specialized container or folder within New Relic that helps organize and manage related documents and resources. This makes it easier for the LLM to access the right information when needed. A clear name and accurate description guide the LLM in selecting the right RAG tool for each prompt, which ensures it provides relevant and context-aware responses.
50+
51+
To create a new RAG tool in your New Relic account, you'll use the `entityManagementCreateRagTool` mutation:
52+
53+
1. Make sure to replace `${ORGANIZATION_ID}` with your actual organization ID obtained in the previous step.
54+
2. Run the below mutation.
55+
3. If successful, you'll receive an `id` for your RAG tool. Save this `id` for later steps when associating documents.
4056

4157
```graphql
4258
mutation {
@@ -54,13 +70,32 @@ mutation {
5470
}
5571
```
5672
</Collapser>
73+
</Step>
74+
75+
<Step>
5776
<Collapser id = "upload-document" title = "Upload a document to the Blob API">
5877

5978
<Callout variant="important">
60-
All indexed documents are visible to all users within your organization. Make sure the documents you index comply with your internal policies for use of the services.
79+
All indexed documents are visible to all users within your organization. Make sure the documents you index comply with your internal policies, and do not upload sensitive or private data.
6180
</Callout>
6281

63-
NerdGraph is optimized for structured data queries and mutations and not for the efficient transfer of files. In order to upload documents, you will use the Blob API.
82+
### The Blob API and its purpose
83+
The Blob API is a New Relic service designed for uploading files, such as documentation and runbooks, to your account. NerdGraph is optimized for structured data queries and mutations and not for efficient transfer of files, so the Blob API is required for uploading documents.
84+
85+
### Authentication requirements
86+
You need a valid New Relic API key with permissions to upload documents. To get the API key for uploading a document to New Relic using the Blob API:
87+
88+
1. Log in to your [New Relic](https://one.newrelic.com/) account.
89+
2. Create and manage your API keys from the [API keys UI page](https://one.newrelic.com/administration/api-keys).
90+
3. Click **Create a key**, and fill the required details (or use an existing one with the required permissions).
91+
4. Click **Create a key** and copy the generated key (it'll look like NRAK-XXXXXXXXXX).
92+
93+
### Required headers and payload
94+
95+
- `Api-Key`: Your New Relic API key for authentication.
96+
- `NewRelic-Entity`: Metadata about the document, such as its name.
97+
- `Content-Type`: The format of the file being uploaded (for example, `application/json`).
98+
- The payload (`@incidents.json`) should be the file you want to upload. Ensure it contains relevant content and follows your organization’s standards.
6499

65100
Here's an example of how to upload a document using a `curl` `bash` command:
66101

@@ -80,10 +115,19 @@ The response will look like this:
80115
"blobVersionEntity": null
81116
}
82117
```
83-
</Collapser>
118+
### Next steps
119+
120+
After uploading, save the `entityGuid` that you receive in the response. You can use this GUID to create a relationship between the document and your RAG tool in the next step or query the document in NerdGraph to view it.
121+
122+
</Collapser>
123+
</Step>
124+
125+
<Step>
84126
<Collapser id = "view-the-rag-document-entity-represented-in-nerdgraph" title = "View the RAG document entity represented in NerdGraph">
85127

86-
You can view the RAG document entity in NerdGraph.
128+
After uploading your document, you can verify it was successfully indexed by querying its entity in NerdGraph. In the query below, replace the `${RAG_DOCUMENT_GUID}` placeholder with the `entityGuid` you received in the previous step.
129+
130+
This query will return details about your RAG document, including its name, type, and a URL to access the uploaded file.
87131

88132
```graphql
89133
{
@@ -106,8 +150,19 @@ You can view the RAG document entity in NerdGraph.
106150
}
107151
```
108152
</Collapser>
153+
</Step>
154+
155+
<Step>
109156
<Collapser id = "create-a-relationship-between-the-rag-document-and-the-rag-tool" title = "Create a relationship between the RAG document and the RAG tool">
110-
Now that you have a RAG tool and a RAG document, you need to associate them with each other. This is done via the Entity Management APIs in NerdGraph.
157+
Now that you have uploaded your document and created a RAG tool, you need to associate them so New Relic AI can use your indexed content for context-aware responses.
158+
159+
This relationship links your RAG document to the RAG tool, making the document searchable and usable by the AI. You’ll use the `entityManagementCreateRelationship` mutation in NerdGraph to do this.
160+
161+
### How to create the relationship
162+
163+
1. Replace `${RAG_DOCUMENT_GUID}` with the GUID of your uploaded document (the `entityGuid` you received after uploading your document in step 3).
164+
2. Replace `${RAG_TOOL_GUID}` with the GUID of your RAG tool (the `id` you received after creating your RAG tool in step 2).
165+
3. Run the following mutation:
111166

112167
```graphql
113168
mutation {
@@ -139,14 +194,14 @@ mutation {
139194
}
140195
```
141196
</Collapser>
142-
</CollapserGroup>
143-
144-
## Verify your configuration
197+
</Step>
145198

146-
<CollapserGroup>
199+
<Step>
147200
<Collapser id="query-to-see-relationships-between-rag-documents-and-rag-tools" title="Query to see relationships between RAG documents and RAG tools">
148201

149-
You can query relationships between RAG documents and RAG tools.
202+
After creating a relationship between your RAG document and RAG tool, you can verify the association by querying relationships in NerdGraph. This helps ensure your document is properly linked and available for New Relic AI to use.
203+
204+
- Replace `${RAG_DOCUMENT_ID}` with the `entityGuid` of your uploaded document.
150205

151206
```graphql
152207
{
@@ -168,9 +223,14 @@ You can query relationships between RAG documents and RAG tools.
168223
}
169224
```
170225
</Collapser>
226+
</Step>
227+
228+
<Step>
171229
<Collapser id="query-the-rag-tool" title="Query the RAG tool">
172230

173-
You can query your RAG tool and receive chunked matches based on the documents indexed for a given tool. You may use New Relic AI to summarize the returned chunk matches, or you may use the NerdGraph APIs to retrieve the match and use your own AI on your own systems.
231+
After you've set up your RAG tool and indexed documents, you can query the RAG tool to retrieve relevant information based on your prompt. This allows New Relic AI to surface context-aware answers using your organization's documentation.
232+
233+
Use the following query in NerdGraph, replacing `${RAG_TOOL_GUID}` with the GUID of your RAG tool (`id` in the response after you run the `entityManagementCreateRagTool` mutation). The response will include chunked matches from your indexed documents, which you can use directly or summarize with New Relic AI.
174234

175235
```graphql
176236
{
@@ -191,4 +251,5 @@ You can query your RAG tool and receive chunked matches based on the documents i
191251
}
192252
```
193253
</Collapser>
194-
</CollapserGroup>
254+
</Step>
255+
</Steps>

0 commit comments

Comments
 (0)