Installation
Base Package
pip install retrico
This installs RetriCo with its core dependencies:
- GLiNER — fast, local entity and relation extraction (no API keys needed)
- Pydantic — data validation
- PyYAML — YAML config support
- Neo4j — Bolt protocol driver (also used by Memgraph)
- FalkorDB Lite — embedded graph database (zero-config default store)
Optional Extras
RetriCo keeps optional dependencies separate so you only install what you need.
LLM-based Extraction
Use OpenAI, vLLM, Ollama, or any OpenAI-compatible API for NER and relation extraction:
pip install openai
Entity Linking
Link extracted entities to a knowledge base using GLinker:
pip install glinker
Graph Databases
| Database | Install | Notes |
|---|---|---|
| FalkorDB Lite | Included by default | Embedded, zero-config — used when no store is specified |
| Neo4j | Included by default | neo4j driver ships with base package |
| FalkorDB (server) | pip install falkordb | For connecting to a FalkorDB server instance |
| Memgraph | No extra install | Uses the same Bolt protocol driver as Neo4j (neo4j package) |
See Databases for connection and configuration details.
PDF Extraction
Extract text and tables from PDF documents:
pip install 'retrico[pdf]'
# or individually:
pip install pdfminer.six pdfplumber
KG Embeddings
Train knowledge graph embeddings with PyKEEN:
pip install pykeen
Vector Stores
| Store | Install | Notes |
|---|---|---|
| In-memory | Included by default | NumPy-based, good for small datasets |
| FAISS | pip install faiss-cpu (or faiss-gpu) | Fast approximate nearest neighbor search |
| Qdrant | pip install qdrant-client | Managed or self-hosted vector database |
Requirements
- Python >= 3.10
Development Install
git clone https://github.com/Knowledgator/retrico.git
cd retrico
pip install -e ".[dev]"
This installs all development dependencies including pytest, ruff, and testing utilities.