⚠️ PROJECT STATUS: COMPLETED / ARCHIVEDThis project was developed as a team assignment for a Master's program exam. It is now concluded and will not be maintained. The code is provided as-is for educational purposes.
A Retrieval-Augmented Generation (RAG) chatbot that provides accurate vaccine information by combining document retrieval with AI-powered responses and sentiment analysis.
This project was developed as a homework assignment for a Master's program in AI, completed within one week of part-time work. The goal was to create a practical application demonstrating:
- RAG (Retrieval-Augmented Generation) techniques for grounding AI responses in factual documents
- Multi-agent orchestration using Google's Agent Development Kit (ADK)
- Sentiment analysis to understand user emotional state and possibly trigger escalations (human intervention)
- Document processing from multiple sources (PDFs and web pages)
- Vector embeddings for semantic search
- Persistent session management for conversational continuity. An introduction to context engineering.
VaxTalk assists users with vaccine-related questions by:
- Retrieving relevant information from official vaccine documentation and websites
- Analyzing user sentiment to provide empathetic responses, and escalate to human interaction if necessary
- Synthesizing information through a multi-agent workflow
- Maintaining conversation history during the session
When a conversation shows high frustration or confusion, VaxTalk can notify a human via Telegram and append a user-facing notice so people know someone is joining.
- Enable the flow by setting
ESCALATION_ENABLED=truein.env. - Provide
TELEGRAM_BOT_TOKENandTELEGRAM_CHAT_ID(direct chat or group ID). - Tune thresholds with
ESCALATION_DIMENSIONSandESCALATION_TRIGGER_LEVEL(default: high frustration/confusion). - Customize the Telegram payload and UI notice via
ESCALATION_MESSAGE_TEMPLATEandESCALATION_NOTICE_TEXT.
If the Telegram call fails, the app logs a warning but continues responding; no retries are attempted for the same session.
- Python 3.11+
- UV package manager (recommended) or pip
- Google API Key (for Gemini models)
-
Clone the repository
git clone https://github.com/GabrieleDiCorato/vaxtalk.git cd vaxtalk -
Install dependencies
Using UV (recommended):
uv sync --all-groups
-
Configure environment variables
Copy the
.env.examplefile to create your own.envfile:cp .env.example .env
Edit the
.envfile with your configuration. See.env.examplefor detailed documentation and examples of all available options. -
Prepare document sources
Place your PDF documents in the folder specified by
DOC_FOLDER_PATH(e.g.,docs/) and configureDOC_WEB_URL_ROOTif you want to crawl a website.
Before first run or when you want to refresh the knowledge base with updated documents:
uv run load-corpusThis command will:
- Clear the existing cache
- Reload all PDF documents from your document folder
- Crawl the configured website (if
DOC_WEB_URL_ROOTis set) - Build new embeddings and save them to cache
The process may take several minutes depending on:
- Number of PDF files
- Website size and depth
- Your internet connection speed
When to reload the corpus:
- After adding or updating PDF documents
- When the source website has been updated
- If you change RAG configuration parameters (chunk size, overlap, etc.)
- To troubleshoot cache-related issues
The easiest way to launch VaxTalk is using the built-in uv script:
uv run vaxtalkThis will:
- Initialize the knowledge base
- Start the web server on port 42423
- Open the interface at
http://localhost:42423
Alternatively, you can use the ADK command directly:
adk web --port 42423 --session_service_uri sqlite+aiosqlite:///cache/vaxtalk_sessions.db --logo-text VaxTalkAssistantNavigate to the URL provided by the adk message.
Importing the top-level vaxtalk package intentionally has almost no side
effects. When you need the ADK objects programmatically (e.g.
from vaxtalk import root_agent), the package now lazy-loads
vaxtalk.agent the moment one of those attributes is accessed. This keeps
utility scripts such as uv run load-corpus lightweight while still exposing
the same public interface for ADK launchers.
On first launch, the system will:
- Check for existing cache in the
CACHE_DIRfolder - If no cache exists, automatically build the knowledge base:
- Process PDF documents from
DOC_FOLDER_PATH - Crawl website from
DOC_WEB_URL_ROOT(if configured) - Generate embeddings and save to cache
- Process PDF documents from
- Initialize the SQLite session database
- Start the web server
Note: The initial knowledge base building may take several minutes if no cache exists. Subsequent starts will be fast, loading from the cached embeddings. Use uv run load-corpus to manually rebuild the cache when needed.
This project is for educational purposes as part of a Master's program coursework. It is provided as-is and it will not be maintained or updated.