The menu.json dataset used in this project can be found at Menu JSON Dataset.
This project which is a Take Home Assignment which I got from VOX AI aims to revolutionize the drive-thru ordering process in restaurants by implementing a Retrieval-Augmented Generation (RAG) system. It leverages advanced NLP techniques to automate and accurately respond to customer inquiries about menu items in real-time, enhancing the overall customer experience.
-
Vector Database Setup: Creation of an in-memory vector database to store menu items as vector representations for efficient semantic similarity matching.
-
Query Processing: Interpreting customer queries, extracting relevant information, and converting it into a vector form to find the best matching menu items.
-
Response Generation: Using retrieved information to generate clear and concise responses to customer inquiries, detailing matched menu items.
This project is a preliminary implementation of a voice-based food ordering system. Currently, it is designed to handle basic queries, such as directly ordering specific items (e.g. "Can you please order Popcorn Chicken for me?", "I want Crispy Tenders", "I would like to order a Pepsi", etc. or any other item available in the Menu but not Meals). The current version supports simple item recognition and pricing information based on vector matching from a structured dataset. Although after matching the user query with vector db, the matched dataset includes detailed information on nutritional content, allergens, and availability, these features are not yet incorporated into the response system but are straight forward to add in future iterations based on the current implementation.
To run the project, ensure you have the following libraries:
- spaCy: For natural language processing. Ensure to download the English model with
python -m spacy download en_core_web_sm
. - numpy: for numerical computations
- gensim: for Word2Vec model and text processing
- annoy: for building and querying the vector database
- sklearn: for using vector similarity measures outside of Annoy
You can install these dependencies using pip:
pip install spacy numpy gensim annoy scikit-learn
To get started with this project:
- Clone this repository to your local machine.
- Ensure you have Jupyter Notebook installed and running.
- Install the required dependencies.
- Download the "Menu JSON Dataset" and place it in the designated directory.
- Open and run the Jupyter Notebook "RAG_Assignment.ipynb" to run and evaluate the RAG Assignment.
We welcome contributions to enhance the functionality and efficiency of this script. Feel free to fork, modify, and make pull requests to this repository. To contribute:
- Fork the Project.
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
). - Commit your Changes (
git commit -m 'Add some AmazingFeature'
). - Push to the Branch (
git push origin feature/AmazingFeature
). - Open a Pull Request against the
main
branch.
This project is licensed under the MIT License - see the LICENSE
file for details.
Author: Akhil Chhibber