Skip to main content

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​

DatabaseInstallNotes
FalkorDB LiteIncluded by defaultEmbedded, zero-config — used when no store is specified
Neo4jIncluded by defaultneo4j driver ships with base package
FalkorDB (server)pip install falkordbFor connecting to a FalkorDB server instance
MemgraphNo extra installUses 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​

StoreInstallNotes
In-memoryIncluded by defaultNumPy-based, good for small datasets
FAISSpip install faiss-cpu (or faiss-gpu)Fast approximate nearest neighbor search
Qdrantpip install qdrant-clientManaged 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.