Welcome to the AI Analyst Agent repository! This project aims to simplify business data analysis by allowing users to ask questions in plain English. With the power of AI, you can generate SQL queries, create visualizations, and receive insights—all without needing any SQL knowledge.
- Natural Language Queries: Ask questions about your business data in plain English.
- Automatic SQL Generation: Receive SQL queries generated based on your questions.
- Visualizations: Get graphical representations of your data with ease.
- AI Insights: Benefit from AI-powered recommendations to enhance decision-making.
- User-Friendly Interface: No technical expertise required to get started.
This project incorporates a range of technologies to deliver its features effectively:
- Python: The primary programming language for backend development.
- MySQL: The database management system used for data storage and retrieval.
- Streamlit: A framework for creating interactive web applications.
- Plotly: A library for generating dynamic visualizations.
- OpenAI's GPT-4: The AI model that powers natural language processing.
- LangChain: A framework that helps manage and chain together different language models.
To get started with the AI Analyst Agent, follow these steps:
-
Clone the Repository: Use the following command to clone the repository to your local machine.
git clone https://github.com/sorin177/ai-analyst-agent.git
-
Navigate to the Directory: Change to the project directory.
cd ai-analyst-agent
-
Install Requirements: Install the necessary packages using pip.
pip install -r requirements.txt
-
Set Up the Database: Configure your MySQL database and update the connection settings in the
config.py
file. -
Run the Application: Start the Streamlit application with the following command.
streamlit run app.py
Now, you can access the application at http://localhost:8501
.
Once the application is running, you will see a user-friendly interface. Here's how to use it:
-
Ask a Question: Type your question in the input box. For example, "What are my sales for the last quarter?"
-
Receive SQL Query: The system will generate the SQL query based on your question.
-
View Visualizations: After executing the query, you will see visualizations that represent your data.
-
Get Insights: The AI will provide insights and recommendations based on the analysis.
Here are some examples of questions you can ask:
- "What is the average revenue per customer?"
- "Show me the sales trend over the last year."
- "Which products are the best sellers this month?"
The AI Analyst Agent will interpret these questions and generate the necessary SQL queries and visualizations.
We welcome contributions to improve the AI Analyst Agent. To contribute:
-
Fork the Repository: Click the "Fork" button at the top right of the page.
-
Create a Branch: Create a new branch for your feature or bug fix.
git checkout -b feature/YourFeature
-
Make Changes: Implement your changes.
-
Commit Your Changes: Commit your changes with a clear message.
git commit -m "Add your message here"
-
Push to Your Fork: Push your changes to your forked repository.
git push origin feature/YourFeature
-
Create a Pull Request: Go to the original repository and click "New Pull Request."
This project is licensed under the MIT License. See the LICENSE file for details.
For any questions or suggestions, feel free to reach out:
- GitHub: sorin177
- Email: your-email@example.com
Check the Releases section for the latest updates and downloads.
Thank you for your interest in the AI Analyst Agent! We hope this tool helps you make data-driven decisions effortlessly.