Agentic_search
by Code-Trees
This project combines semantic search capabilities with Large Language Models (LLM) to provide intelligent file search functionality in Linux systems. It allows users to search for files using natural language queries.
View on GitHub
Last updated: N/A
File Search Assistant with LLM Integration
This project combines semantic search capabilities with Large Language Models (LLM) to provide intelligent file search functionality in Linux systems.
Features
- Natural language file search queries
- Semantic search using BERT embeddings
- File system integration with MCP server
- Gemini LLM integration for query understanding
- Automatic file extension inference
Prerequisites
- Python 3.8 or higher
- CUDA-compatible GPU (optional, for faster processing)
- Linux operating system
Installation
- Clone the repository:
git clone <repository-url>
cd LLm_To_agent/data_dir
- Install dependencies:
pip install -r requirements.txt
- Configure environment variables:
- Create a
.env
file in the project root - Add your Gemini API key:
GEMINI_API_KEY="your-api-key-here"
- Create a
Project Structure
data_dir/
├── main.py # Main application entry point
├── tools/
│ └── file_finder.py # File search implementation
├── utils/
│ └── doc_Search.py # Document search utilities
├── llm/
│ └── gemini_client.py # LLM integration
├── .env # Environment variables
└── OSData_store.pth # Embedded data storage
Usage
- Start the application:
python main.py
- Enter your search query when prompted:
What file are you looking for?
> "find a python script that handles file operations"
- The system will:
- Extract the relevant filename using LLM
- Search the file system using semantic search
- Display matching file locations
Features in Detail
- LLM Integration: Uses Google's Gemini for natural language understanding
- Semantic Search: Employs BERT embeddings for context-aware file matching
- MCP Server: Handles file system operations efficiently
- Extensible Architecture: Easy to add new search capabilities
Troubleshooting
If you encounter the error "Embeddings file not found", run:
cd ~ && find / -type f 2>/dev/null >> Desktop/LLm_To_agent
License
[Your chosen license]
Contributing
[Your contribution guidelines]