- This project leverages Meta's llama-3.1-8b to generate mongodb queries based on natural language inputs provided by user. It does this using langgraph and an Agentic workflow by detecting contexts and also stores the generated queries in the database for future usage.
- Python 3.9+
- MongoDB Instance Use MongoDB Compass to access your instance.
- API Keys for LLM services (e.g., OpenAI, Hugging Face).
- Guardrails for validations.
- Clone the repository:
git clone https://github.com/walkingtree/xops-nlp-search.git
cd xops-nlp-search- Create and activate the environment:
python3 -m venv env
source env/bin/activate # For Linux
./env/Scripts/activate # For Windows- Install all required dependencies:
pip install -r requirements.txt-
Setup Guardrails:
- Get your API Key here: Guardrails-AI
- Run the below in the terminal:
guardrails configure
- Set remote inferencing to Yes and diagnostics to No
-
Create .env
- Use the .env.example to create your own .env file
- Add all the keys needed in .env
- Run the Project
python run.py