Skip to content
Horst Herb edited this page Nov 19, 2025 · 3 revisions

BMLibrarian Wiki

Welcome to the BMLibrarian documentation! BMLibrarian is a comprehensive Python library and application providing AI-powered access to biomedical literature databases, featuring a sophisticated multi-agent architecture for research automation.

🚀 Quick Links

For New Users

For Developers

For Researchers

What is BMLibrarian?

BMLibrarian is a comprehensive Python library that provides AI-powered access to biomedical literature databases. It features a multi-agent architecture with specialized agents for:

  • Query Processing - Convert natural language questions to database queries
  • Document Scoring - Assess relevance of documents to research questions
  • Citation Extraction - Extract specific passages that answer questions
  • Report Generation - Synthesize evidence into publication-quality reports
  • Counterfactual Analysis - Find contradictory evidence for balanced analysis
  • Fact Checking - Validate biomedical statements against literature

Key Features

🤖 Multi-Agent Architecture

  • Specialized AI agents for different research tasks
  • Coordinated workflow orchestration
  • Queue-based batch processing
  • Support for multiple LLM models (via Ollama)

🗄️ Robust Database Infrastructure

  • PostgreSQL with pgvector for semantic search
  • Support for PubMed (38M+ articles) and medRxiv preprints
  • Full-text search and vector similarity search
  • Automatic schema migrations

🖥️ Multiple Interfaces

  • CLI - Interactive command-line interface
  • Qt GUI - Modern desktop application with plugin architecture
  • Python API - Full programmatic access

🔍 Advanced Features

  • Multi-model query generation (20-40% more relevant documents)
  • Citation hallucination prevention
  • Query performance tracking
  • OpenAthens institutional access support
  • PDF management and viewing

🛡️ Privacy-First Design

  • Runs entirely with local models (Ollama)
  • No API keys required
  • No proprietary services needed
  • Complete offline operation (after initial data sync)

System Requirements

  • Python: 3.12 or higher
  • Database: PostgreSQL 14+ with pgvector extension
  • AI/LLM: Ollama for local model inference
  • Package Manager: uv (recommended) or pip

Quick Start

# Install dependencies
uv sync

# Set up database and import data
uv run python initial_setup_and_download.py test_database.env

# Run the Qt GUI
uv run python bmlibrarian_qt.py

# Or run the CLI
uv run python bmlibrarian_cli.py

See the Getting Started guide for detailed installation instructions.

Project Structure

bmlibrarian/
├── src/bmlibrarian/          # Main source code
│   ├── agents/               # Multi-agent system
│   ├── importers/            # Data importers (PubMed, medRxiv)
│   ├── embeddings/           # Document embeddings
│   ├── factchecker/          # Fact-checking system
│   ├── gui/qt/               # Qt GUI application
│   │   ├── plugins/          # Plugin-based architecture
│   │   ├── widgets/          # Reusable UI components
│   │   └── resources/        # Styles and assets
│   ├── database.py           # Database access layer
│   └── config.py             # Configuration management
├── doc/                      # Comprehensive documentation
│   ├── users/                # End-user guides
│   └── developers/           # Technical documentation
├── tests/                    # Test suite
└── examples/                 # Example scripts

Documentation Overview

User Documentation

Developer Documentation

Research Guides

Community and Support

Recent Updates

November 2025:

  • ✅ Qt GUI with plugin architecture
  • ✅ Fact Checker system with CLI and GUI
  • ✅ Multi-model query generation
  • ✅ Query performance tracking
  • ✅ Citation hallucination prevention
  • ✅ PostgreSQL audit trail
  • ✅ Automatic database migrations

License

BMLibrarian is open-source software. See the repository for license details.


Next Steps:

  1. Install BMLibrarian and set up your environment
  2. Follow the User Guide to learn the basics
  3. Try the Qt GUI for a visual research workflow
  4. Develop a Plugin to extend functionality

Welcome to BMLibrarian! 🎉

Clone this wiki locally