Skip to content

beckn/knowledge-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Beckn-GPT

Version: v1.0


Overview

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.


System Architecture

System Architecture Diagram


How to Run or Modify

  1. 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

  1. 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
  1. How to modify prompts: Update logic in the javascript code block in the n8n pipeline before the prompt is sent to AI Agent.

  2. 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.

  3. 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

  4. 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

  5. ChatGPT Integration: Custom GPT action is set up with the n8n webhook url. Instructions explicitly tell it to use the action tool.

  6. 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?"}'

About

An AI-enabled Knowledge Bot for Beckn Users

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •