`deskquery` is an AI-powered chatbot and data analysis tool that helps companies understand and optimize their desk utilization. It combines a conversational interface (via LLMs) with a robust backend of analytic functions for workplace intelligence.
A Flask-based frontend allows users to ask questions like:
- "How many desks were unused last week?"
- "Simulate the effect of closing Room 3."
- "Estimate how many tables we need for 90% utilization."
- Interprets natural language queries via a large language model (LLM)
- Maps them to predefined analytic functions
- Executes Python functions to return insights about desk usage
- Includes simulations, forecasts, anomaly detection, and interactive plotting
To use the package, you need to install it along with its dependencies:
# Install the package
pip install .To enable language model access, create an .env file for the LLM API to use.
The file should be located in /src/deskquery/llm and feature
a Groq Cloud API key
The Groq API is used to connect to Llama models while the Google API offers access to multiple Gemini models.
The .env file should contain the following keys:
GROQ_API_KEY = <Your Groq Cloud API key here>
GOOGLE_AIS_API_KEY = <Your Google AI Studio API key here>
After the API keys have been added, you can start the web frontend and begin chatting
# Start the Flask web app
python3 src/deskquery/webapp/app.py- ✅ LLM-based query interpretation (Gemini, LLama, ...)
- ✅ Modular analytics functions (forecasting, clustering, policy simulation)
- ✅ Interactive visualizations (Matplotlib / Plotly)
- ✅ Structured JSON response pipeline
- ✅ Flask-based web frontend with chat interface
- User asks a question
- LLM receives a prompt including function summaries and example queries
- LLM replies with JSON: selects a function + fills in parameters
- Backend executes the selected function, or asks the user for missing info
- Frontend displays the result (text, plot, or warning)
- Empower managers to ask "what if" questions
- Close the loop between workplace data and strategic decisions