Engati - User Guide
...
3. Path Setup
RAG Path Setup
11 min
once the document or custom script status shows ready to search ready to search , the next step is to configure a path so the agent can retrieve trained knowledge during conversations this path uses a json api node to call the rag search api and fetch relevant results based on the user query step 1 — create a new path go to the builder section click + add path and create a new path example path name knowledge base path step 2 — add a json api node inside the path, click add node and select json api this node will be used to call the rag api and fetch trained knowledge step 3 — configure the json api request set the request method to post in the request url field, enter the rag api endpoint example \<https //rag search> go to the body tab and set content type as json use the following request body { "botref" {{bot id}}, "customerid" {{bot customerid}}, "limit" 3, "hybrid" false, "where" {}, "queries" \[ "{{user query}}" ] } this request sends the user query to the rag api and asks for the top matching results request body explanation field description botref unique identifier of the bot customerid customer identifier of the bot account limit maximum number of matching results to return hybrid controls whether hybrid search is enabled or not where optional filter object for narrowing results queries contains the user query sent for rag search step 4 — test the api request click send request to test the api the system will prompt you to enter test values for bot id bot customerid user query where to find bot id and customerid bot id (bot id) – found in the builder url (last number in the url) example 145265 customer id (customerid) – found in integrations → engati api → customer identifier example 120178 enter sample values and submit the request example bot id → 145265 bot customerid → 120178 user query → general medicine step 5 — verify the api response once the request is successful, the api response will appear in the response section the returned data contains the matched documents from the trained rag knowledge base review the response and identify which part of the response needs to be stored as an attribute example response structure { "response" { "documents" \[ "page content doctor name dr priya sharma speciality neurology hospital" ], "ids" \[ "2c1f08bd 06d5 4073 aa6b d6a8726387c5" ], "metadata" \[ { "category" "default", "created at" "fri, 13 mar 2026 05 43 02 gmt", "document name" "a4d88c721470711d19ba2ca86f5ceb22", "source" "69b3a3e25f9acf77e874bdc9", "type" "custom script" } ] }, "status" { "message" "success", "status code" 1000 } } response explanation field description response documents retrieved text content from the trained rag knowledge base response ids unique ids of the matched indexed records response metadata additional source information about each matched record status message api execution result status status code status code returned by the api step 6 — map the response to an attribute in the attributes section, create an attribute to store the required response value for example, you can create an attribute such as response then map it to the response field returned by the api example mapping response response this stores the selected api response inside an engati attribute so it can be used later in the path or agent response step 7 — save the node after configuring the request, testing the response, and mapping the attribute, click save the json api node is now ready to fetch trained rag knowledge during conversation flow execution how this works when the path is triggered the user query is sent to the rag search api the api returns the most relevant trained content the selected part of the response is stored in an attribute that attribute can then be used in the next nodes to generate the final agent reply 📚 next step once the rag api response is stored in an attribute, you can use that attribute in the next node to send the retrieved answer back to the user 👉 continue to the next section docid\ uuhjizq8x 4pijssvst9q
