Skip to content

Integrate AI-powered chatbot backend with contextual EduBridge knowledge support#80

Open
shifali0156-wq wants to merge 4 commits into
AditixAnand:mainfrom
shifali0156-wq:fix/backend-powered-AI-assistant
Open

Integrate AI-powered chatbot backend with contextual EduBridge knowledge support#80
shifali0156-wq wants to merge 4 commits into
AditixAnand:mainfrom
shifali0156-wq:fix/backend-powered-AI-assistant

Conversation

@shifali0156-wq
Copy link
Copy Markdown

@shifali0156-wq shifali0156-wq commented May 20, 2026

Note- Kindly add gssoc tag and other required tags to the issue so that this PR shall be considered for the GSSOC'26 leaderboard.

fixes #24

This PR upgrades the EduBridge chatbot from a frontend hardcoded-response system to a backend-powered AI chatbot integrated with the Flask API.

The chatbot can now answer dynamically using contextual EduBridge course information instead of relying entirely on static conditional logic in chatbot.js.

Major Improvements

1. Frontend ↔ Backend Chat Integration

Updated the chatbot frontend to send user messages to the Flask /chat endpoint using asynchronous API requests.
Chatbot responses are now generated dynamically by the backend AI model instead of static frontend conditions.

2. Added Context-Based Knowledge Source

Created contextual knowledge files for:

  • Home/Index page
  • Career page
  • AI & ML page
  • Web Development page

These documents were combined into a single text-based knowledge source which is injected into the LLM prompt to improve response quality and platform-specific answers.

This allows the chatbot to answer questions using EduBridge-specific information instead of only relying on generic AI responses.

3. Backend AI Integration

Updated Flask backend (app.py) to:

  • accept POST requests at /chat
  • process user queries
  • generate AI responses using LLM APIs
  • return responses to frontend in JSON format

Notes

  • Development and testing were primarily done in GitHub Codespaces.
  • During development, Gemini API was temporarily used because an OpenAI subscription/API quota was unavailable.
  • Final code was reverted back to OpenAI-compatible structure to maintain project consistency.
  • Codespaces URLs were later switched back to localhost-based configuration where applicable.

Some environment-specific configurations (Codespaces vs localhost URLs, API provider switching) may still require additional validation across setups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace hardcoded chatbot.js responses with backend-powered AI assistant

1 participant