You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/apis/nerdgraph/examples/nerdgraph-rag.mdx
+11-3Lines changed: 11 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,8 @@ To learn more about the knowledge connector, refer to [New Relic AI Knowledge co
20
20
21
21
To start indexing your content and benefit from the knowledge connector with New Relic AI, follow these mentioned steps:
22
22
23
+
## Create your RAG tool [#create-your-rag-tool]
24
+
23
25
<CollapserGroup>
24
26
<Collapserid="get-started"title="Obtain your organization ID">
25
27
@@ -42,7 +44,7 @@ Organization ID is required to perform mutations and queries in NerdGraph when s
42
44
43
45
Before performing this step, ensure you have "Org Product Admin" permissions.
44
46
45
-
A RAG tool acts as a specialized container within New Relic, that helps organize related documents and resources. Providing a clear name and accurate description while creating the RAG tool helps the LLM select the right tool for each prompt, ensuring relevant, context-aware responses.
47
+
A RAG tool acts as a specialized container for organizing related documents and resources in New Relic. A clear name and accurate description for your RAG tools helps the LLM select the right tool for each prompt, ensuring relevant and context-aware responses.
46
48
47
49
To create a new RAG tool in your New Relic account, run the following `entityManagementCreateRagTool` mutation:
48
50
@@ -117,8 +119,10 @@ mutation {
117
119
```
118
120
119
121
You should save the `id` returned as you'll need it in later steps to link documents to the tool, verify relationships, and query the tool for relevant information in New Relic.
120
-
121
122
</Collapser>
123
+
124
+
## The indexing phase [#the-indexing-phase]
125
+
122
126
<Collapserid="upload-document"title="Upload a document via the Blob API">
123
127
124
128
<Calloutvariant="important">
@@ -219,7 +223,7 @@ curl -X POST https://blob-api.one-service.newrelic.com/v1/e/organizations/$ORGAN
219
223
```
220
224
### Next steps
221
225
222
-
After uploading, your document will be indexed and becomes available for search and retrieval by New Relic AI. Save the `entityGuid` from the response as you’ll need it to create a relationship with your RAG tool or to query the document in NerdGraph.
226
+
After uploading your document, it is indexed and becomes available for New Relic AI to search and retrieve. You must save the `entityGuid` from the response to create a relationship with your RAG tool or to query the document in NerdGraph.
223
227
224
228
</Collapser>
225
229
<Collapserid="view-the-rag-document-entity-represented-in-nerdgraph"title="View the RAG document entity represented in NerdGraph">
@@ -382,6 +386,9 @@ mutation {
382
386
}
383
387
```
384
388
</Collapser>
389
+
390
+
## The retrieval phase [#the-retrieval-phase]
391
+
385
392
<Collapserid="query-to-see-relationships-between-rag-documents-and-rag-tools"title="Query to see relationships between RAG documents and RAG tools">
386
393
387
394
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.
@@ -449,6 +456,7 @@ After creating a relationship between your RAG document and RAG tool, you can ve
449
456
}
450
457
}
451
458
```
459
+
452
460
</Collapser>
453
461
<Collapserid="query-the-rag-tool"title="Query the RAG tool">
0 commit comments