Version: v1.0
Beckn-GPT is a context-aware AI assistant built to help developers, network participants, and community members seamlessly interact with the Beckn Protocol ecosystem. It crawls, indexes, and updates information from multiple Beckn sources in real-time, offering fast and reliable answers via conversational interfaces like Slack and ChatGPT.
- How to change frequency of updates: Run:
crontab -e
Modify 0 0 1 * * in the line: 0 0 1 * * /bin/bash /home/anjali/real_time_crawler.sh
- How to add documents:
- Adding static documents (from google drive or elsewhere): Add the documents to be added in folder ~/beckn-utilities/rag-server/static_docs/ on the vm. Only non binary file types are supported.
- Adding a github repository:
- Add the path to the github repository in the list of repositories in the file ~/beckn-utilities/rag-server/clone_repos.sh on the vm.
- After doing the above steps it will automatically add the documents to the database on the first of each month.
- If you want it to be added to the database immediately then run
./real_time_crawler.sh
-
How to modify prompts: Update logic in the javascript code block in the n8n pipeline before the prompt is sent to AI Agent.
-
Managing Feedback: To send feedback start the query with followed by the feedback. The feedback is stored in the feedback sheet on BecknGPT drive along with session ids. To find relevant context to the feedback filter the execution log in n8n using sessionId as the key.
-
Setting up the n8n workflow: Create workflow in n8n Import the beckn-rag.json file in the workflow Set up the credentials and connect the webhooks in slack and GPT
-
Slack Integration: Create a bot on Slack Apps Set the permissions in OAuth and Permissions and install to workspace Set N8N slack trigger production webhook as the event URL in event subscriptions Activate N8N workflow before verification Invite bot to Slack channel
-
ChatGPT Integration: Custom GPT action is set up with the n8n webhook url. Instructions explicitly tell it to use the action tool.
-
Running RAG server on GCP VM (Optional): ssh into the server and run
cd beckn-utilities/rag-server
npm run dev
To test document retrieval:
curl -X POST http://34.57.176.98:4000/api/search/vector \
-H "Content-Type: application/json" \
-d '{"query": "What is Beckn protocol?"}'
To test rag model:
curl -X POST http://34.57.176.98:4000/api/search/llm \
-H "Content-Type: application/json" \
-d '{"query": "What is Beckn protocol?"}'