Enhance Your Travel Experience with Personalized RAG Assistance 🌍
TouaRAG is your comprehensive framework for building and evaluating context-aware travel chatbots. Leverage our modular library touarag—packed with implementations for testing various RAG architectures and evaluating their performance—to deliver tailored travel recommendations. In addition, our solution offers an integrated API backend and UI frontend to effortlessly run a RAG chatbot with profile personalization, model selection, and architecture configuration.
Prerequisites:
This framework is designed for Linux environments (due to bash script usage). Make sure to install the required libraries usingrequirements.txt
before proceeding. Additionally, ensure that PostgreSQL 15 is installed on your system.
- Personalized Travel Assistance: Deliver customized travel itineraries based on user profiles.
- RAG Evaluation: Test and evaluate multiple retrieval-augmented generation architectures.
- Integrated Chatbot: Seamlessly run a travel assistant with both API backend and UI frontend.
- Easy Deployment: Manage installation and uninstallation with simple wrapper scripts.
- Modular Design: Swap out models, tweak architectures, and refine evaluation metrics effortlessly.
- Operating System: Linux (for bash script compatibility)
- Dependencies: Install required libraries with:
pip install -r requirements.txt
- Database: PostgreSQL 15 with PGVector plugin must be installed
./install.sh
./uninstall.sh
To securely store your secrets (e.g., tokens, usernames, passwords), place them in the config.yml
file located in the src/api
directory.
Get started quickly by running our integrated API backend and UI frontend with a single command:
./start_app.sh
This wrapper script launches the complete TouaRAG travel assistant application, allowing you to:
- Interact with a dynamic travel chatbot
- Personalize user profiles for tailored recommendations
- Choose from various RAG architectures and models
Below is a brief example showcasing how to evaluate a travel query dataset using the touarag library:
query_engine = TransformQueryEngine(...)
# Create an evaluator
evaluator = Evaluator(eval_dir=EVAL_DIR,
query_engine=query_engine,
sampling=False, # Use for testing purposes
scenario_label="test_scenario_1"
)
evaluator.generate_samples()
evaluator.save_samples(output_dir="...")
evaluator.evaluate(output_dir="...")