Sentinel is a terminal-based AI agent designed for seamless PubMed searches. By transforming natural language queries into detailed MeSH search strategies, it retrieves and organizes relevant articles efficiently. With capabilities to export results to Excel, it's an invaluable tool for researchers navigating PubMed's expansive database.
Sentinel: An AI-Powered PubMed Search Agent
Sentinel is a terminal-based AI application designed to streamline the process of locating relevant PubMed publications. Using a powerful local AI model, Sentinel accepts natural language search queries and transforms them into effective MeSH search strategies. This innovative approach simplifies the retrieval of research articles from PubMed via a user-friendly interface.
Key Features
- Natural Language Processing: Allows the user to input search queries in plain language for a seamless experience.
- AI-Generated Research Purpose: Utilizes the phi3.5 model connected with phidata to produce detailed and relevant research objectives.
- Comprehensive Search Execution: Accesses the PubMed API through Biopython, retrieving up to 250 top articles tailored to the search criteria, sorted by relevance and publication date.
- Efficient Data Management: Saves search results along with metadata into a relational SQL database for future reference.
- Export Functionality: Facilitates the export of search results and metadata to an Excel file, organized into user-friendly tabs.
Example Usage
To execute a new search from the terminal, use the command:
python main.py --query "efficacy of placebo injections in knee osteoarthritis patients between 2000 and 2025" --export
In the absence of command line arguments, Sentinel will prompt for user input through an interactive menu, providing options to run a new search or view historical results.
Sample Output
When initiating a search query, the application will retrieve and display the number of relevant PubMed entries found, as exemplified below:
Found 250 PubMed IDs
Retrieved 249 search results
Data stored successfully in the database.
Sentinel is a significant tool for researchers, providing a robust methodology to access and analyze scientific literature quickly and effectively.
For a visual overview, watch the demo here.
File Structure
sentinel/
├── src/
│ ├── __init__.py
│ ├── agent.py
│ ├── config.py
│ ├── menu.py
│ └── utils/
│ ├── __init__.py
│ ├── xlsx_export.py
│ ├── database.py
│ ├── extract_values.py
│ └── pubmed_search.py
├── tests/
│ ├── __init__.py
│ └── test_pubmed_search.py
├── main.py
├── requirements.txt
└── setup.sh
Requirements
The project relies on the following Python packages:
phidata
ollama
sqlalchemy
requests
biopython
openpyxl
pandas
python-dotenv
Configuration
Users must configure an .env
file with necessary connection parameters for the Entrez API, including their email and API key.
Conclusion
Sentinel provides a state-of-the-art solution for accessing scholarly articles in the biomedical field, enhancing productivity and fostering insights with every search.
No comments yet.
Sign in to be the first to comment.