Getting Started¶
This section will help you get FactDb up and running in your Ruby application.
Prerequisites¶
Before installing FactDb, ensure you have:
- Ruby 3.0+ - FactDb requires Ruby 3.0 or later
- PostgreSQL 14+ - With the pgvector extension installed
- Bundler - For dependency management
Quick Navigation¶
-
Installation
Install FactDb and its dependencies
-
Quick Start
Get up and running in 5 minutes
-
Database Setup
Configure PostgreSQL and run migrations
Overview¶
Getting started with FactDb involves three steps:
- Install the gem - Add FactDb to your Gemfile
- Set up the database - Create tables and enable pgvector
- Configure - Set database URL and optional LLM settings
Once configured, you can start ingesting content and extracting facts:
require 'fact_db'
# Configure
FactDb.configure do |config|
config.database.url = ENV['DATABASE_URL']
end
# Create a facts instance
facts = FactDb.new
# Ingest content
source = facts.ingest("Important information...", type: :document)
# Extract and query facts
extracted = facts.extract_facts(source.id)
Continue to the Installation Guide to begin.