This project is an advanced AI-powered query processing system that decomposes complex questions, analyzes them, and provides comprehensive answers using various AI models.
Clone the repository:
git clone https://github.com/bosmanbos/ai-query-processing.git
cd ai-query-processing
Install the required dependencies:
pip install -r requirements.txt
Set up the .env file:
Create a file named .env
in the root directory of the project and add the following content:
OPENAI_API_KEY=your_openai_api_key_here
ANTHROPIC_API_KEY=your_anthropic_api_key_here
Replace your_openai_api_key_here
and your_anthropic_api_key_here
with your actual API keys.
Run the main script:
python ./src/main.py
When you run the main script, you will be prompted to enter a query. The system will then process your query, decompose it into sub-questions, analyze each sub-question, and provide a comprehensive answer.
main.py
: The entry point of the applicationconfig/
: Contains configuration files and core components
agent.py
: Defines the Agent class for query processingAnalyzer.py
: Implements question analysis functionalityprompts.py
: Contains prompts used for various AI interactionsquestion_decomp.py
: Handles question decompositiontools/
: Contains utility functions
web_search.py
: Implements web search functionalitycaching/
: Implements caching mechanismsContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.