HAPPYLAMMA2001/happylamma-chatbot

Muhammad Shamil Umar

AI Chatbot Developer

HAPPYLAMMA Chatbot

Welcome to the HAPPYLAMMA, a RAG-Based Chatbot for neuroscience. This project utilizes the power of Retrieval-Augmented Generation (RAG) to deliver an advanced and interactive chatbot designed to answer questions and provide insights on neuroscience topics. By integrating the Ollama platform to run the Phi3 large language model (LLM) locally, the chatbot leverages sophisticated natural language processing capabilities. The system uses Chroma DB as a vector database to efficiently store and retrieve relevant information. For the frontend, LangChain is employed to manage the conversational flow, and Streamlit is used to create an intuitive and user-friendly interface.

Dataset:

Science of the brain: An Introduction For Young Students: Link
Complexity and the Nervous System: Link
Action potential initiation and backpropagation in neurons of the mammalian CNS: Link
Changes in neuron structure during action potential propagation and synaptic transmission: Link
The autonomic nervous system: Link
The Brain: A User's Guide: Link

Workflow:

This project utilizes a structured workflow to process user input and generate meaningful responses using a combination of vector embedding and advanced language models. The workflow is detailed as follows:
User Input: The process begins when the user provides an input, typically in the form of a text query.
Converting Input to Vectors: The user's input is converted into vectors using the BAAI/bge-small-en vector embedding model provided by HuggingFace. This model transforms the input text into a numerical vector representation that captures the semantic meaning of the text.
Fetching Top 5 Most Similar Chunks from Database: The vector representation of the input is then used to query a ChromaDB database. The database retrieves the top 5 most similar chunks of text based on the vector similarity. These chunks are the most contextually relevant pieces of information related to the user's input.
Sending Prompt and Context to Phi-3 Model: The selected text chunks, along with the original user input, are sent to the Phi-3 model from Microsoft. This step involves constructing a comprehensive prompt that includes both the user's query and the contextual information fetched from the database.
Final Response: The Phi-3 model processes the prompt and generates a final response. This response is then delivered back to the user, completing the interaction.

Chatbot Interface

Partner With Muhammad Shamil
View Services

More Projects by Muhammad Shamil