Engati - User Guide
...
RAG (Custom Data Indexing)
Setup Guide
6 min
follow the steps below to configure and index a custom script for rag search in the generative ai documents section step 1 — navigate to generative ai documents go to the train → generative ai → documents section click upload document to add a new knowledge source for indexing step 2 — select custom as content source in the configure documents to your knowledge base screen, choose custom as the content source this option allows you to upload a python script that fetches external data and converts it into structured json for indexing provide the required information for the script configuration script title enter a descriptive name for the custom script (e g doctor details) category select a category to organize the indexed document language choose the language used in the indexed content step 3 — add the custom script in the custom indexing section, paste the python script that retrieves and formats the external data the script should fetch data from the external source (api, google sheets, sitemap, etc ) • convert the data into structured json • return the json output using sys stdout write this json output will be used by the platform to index the content for rag retrieval step 4 — configure auto refresh (optional) you can enable autorefresh to automatically update the indexed data enable the autorefresh toggle and set the refresh interval (in days) example refresh interval 7 days this ensures the script runs periodically and updates the knowledge base with the latest data after entering the details, click continue step 6 — review and confirm setup review the configuration before starting the indexing process verify the following • script title • category • language • content source • indexing configuration • autorefresh settings once confirmed, click save & start indexing step 7 — verify document status after indexing completes, the document will appear in the generative ai documents list the status will show ready to search this indicates that the custom script data has been successfully indexed and is now available for rag based retrieval 📚 next step once the document status shows ready to search ready to search , configure the docid\ m0f5agwvekrbuek6jq c4 so the ai agent can retrieve indexed data during conversations
