This project presents, a multi-functional AI chatbot designed to handle a wide range of tasks, including SQL query generation, document retrieval, web search integration, and appointment scheduling. Leveraging Google's Generative AI (Gemini) and a modular workflow architecture, this bot intelligently routes user queries to the most appropriate module, ensuring accurate and contextually relevant responses. The system incorporates advanced features such as retrieval-augmented generation (RAG), hallucination detection, and relevance grading to enhance the quality of its outputs. It is a versatile solution for applications in healthcare, customer support, and personal assistance, demonstrating the potential of AI to streamline complex workflows.
In today's fast-paced digital world, there is a growing demand for intelligent systems that can handle diverse tasks efficiently. Traditional chatbots are often limited to predefined responses or single-domain expertise, which restricts their utility. This bot addresses this gap by integrating multiple functionalities into a single, cohesive system.
The chatbot is built on Google's Generative AI (Gemini) and employs a state-of-the-art workflow architecture to route user queries to the appropriate module. Whether it's querying a SQL database, retrieving relevant documents, performing web searches, or scheduling appointments, it ensures accurate and context-aware responses. This project demonstrates the potential of combining retrieval-augmented generation (RAG), natural language processing (NLP), and workflow automation to create a highly adaptable AI assistant
The chatbot retrieves relevant documents from a vector store (Chroma) using Google Generative AI embeddings. It combines the retrieved context with the user's question to generate accurate and concise answers.
The chatbot can answer user questions by generating and executing SQL queries on a database (e.g., patient health data). It uses Google's Gemini model to create syntactically correct SQL queries and validates them for common mistakes.
When the retrieved documents are insufficient, it performs web searches using the Tavily API to gather additional information.
The chatbot integrates with Google Calendar to schedule meetings or appointments based on user input.
A decision-making module routes user queries to the appropriate functionality (SQL, RAG, web search, or booking) based on the content of the question.
The system is implemented using Python and leverages libraries such as LangChain, Chroma, and Google Generative AI. The workflow is managed using a state graph, which ensures seamless transitions between modules.
To evaluate performance, i conducted experiments across four key functionalities:
Tested the chatbot's ability to generate and execute SQL queries on a sample database containing patient health data.
Example query: "What did the patient have for breakfast and dinner on 2023-12-21?"
Evaluated the chatbot's ability to retrieve relevant documents and generate answers based on the retrieved context.
Example question: "Explain the concept of adversarial attacks in AI."
Tested the chatbot's ability to perform web searches and integrate the results into its responses.
Example question: "What are the latest advancements in AI?"
Evaluated the chatbot's ability to schedule meetings using Google Calendar.
Example input: "I want to schedule a meeting for tomorrow at 10 AM."
Each experiment is designed to assess the accuracy, relevance, and efficiency of bots responses.
The bot successfully generated and executed SQL queries, providing accurate answers to user questions.
Example output: "The patient had oatmeal for breakfast and grilled chicken for dinner on 2023-12-21."
The chatbot retrieved relevant documents and generated concise, contextually accurate answers.
Example output: "Adversarial attacks in AI involve manipulating input data to deceive machine learning models."
The performed web searches and integrated the results into its responses, providing up-to-date information.
Example output: "The latest advancements in AI include the development of multimodal models like GPT-4 and Gemini."
The chatbot successfully scheduled meetings and provided users with calendar links.
Example output: "Booked Successfully. Check your calendar using the link [calendar link]."
This bot represents a significant advancement in the field of AI chatbots, combining multiple functionalities into a single, cohesive system. By leveraging Google's Generative AI, retrieval-augmented generation, and intelligent routing, the chatbot provides accurate and contextually relevant responses across a wide range of tasks. The system's modular design and state-of-the-art workflow architecture make it highly adaptable and scalable for various applications, including healthcare, customer support, and personal assistance.
Future work could focus on expanding capabilities to include additional functionalities, such as voice interaction, multilingual support, and integration with more third-party services. With its robust performance and versatility, this has the potential to revolutionize the way we interact with AI systems in our daily lives.
There are no datasets linked
There are no datasets linked