Skip to content

Chatbot Not Properly Implemented – Migrate Logic to Backend with Vector Database #62

@Community-Programmer

Description

@Community-Programmer

Description

The chatbot feature was improperly implemented in the frontend, resulting in it being non-functional and unsuitable for production use. The current approach places the entire chatbot logic (response generation, context handling, and API calls) on the client side, which introduces critical problems:

  • No mechanism for persisting conversations or maintaining context over time.
  • API keys exposed directly in the frontend code, causing a serious security vulnerability.
  • Inability to handle complex or context-rich queries effectively.
  • Suboptimal performance, especially on low-power devices, due to running heavy processing in the browser.
  • The implementation lacks scalability and flexibility needed for future AI/NLP feature expansions.

The chatbot was never fully functional or reliable due to these architectural flaws and must be completely redesigned.

Impact

  • Chatbot responses are inconsistent or fail altogether.
  • Public exposure of sensitive API credentials.
  • No conversational memory or context awareness.
  • Poor user experience on low-end devices due to client-side computation load.
  • Cannot scale or support advanced NLP capabilities moving forward.

Fix Required

  • Re-architect the chatbot by moving all logic from frontend (React) to the backend (Node.js or Python).
  • Integrate a vector database (e.g., Pinecone, Weaviate, or FAISS) for storing and retrieving contextual embeddings, enabling semantic search over conversation history.
  • Develop a secure and efficient REST or WebSocket API for frontend to request chatbot responses.
  • Implement persistent conversation memory through embeddings stored in the vector DB, allowing context-aware replies.
  • Ensure API keys and sensitive logic are fully protected on the server side.
Image

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions