Skip to main content

A modular, production-ready engine platform with clean architecture and comprehensive observability.

Project description

fitz-ai

Python 3.10+ License: MIT Version

🎯 Stable Knowledge Access, Today and Tomorrow

fitz-ai is a knowledge access platform for teams that need reliable, configurable retrieval today, without locking themselves into a single reasoning paradigm tomorrow.

You ingest your knowledge once. How it gets queried can evolve.


🤔 Why fitz-ai Exists

Organizations repeatedly rebuild the same systems: ingest documents, chunk them, embed them, retrieve them, generate answers. Every time the reasoning method changes, everything breaks.

The insight: Reasoning methods evolve faster than knowledge.

  • RAG today
  • Compression-native models tomorrow
  • Something else after that

But the knowledge layer remains.

Most RAG tools optimize one method. fitz-ai stabilizes the knowledge layer itself.


🧠 The Mental Model

  Your Knowledge
      ↓
  fitz-ai (Knowledge Access Layer)
      ↓
  Engines (replaceable)
      ↓
  Answer

What stays stable: Ingested documents, chunking decisions, metadata, provenance, API contracts.

What can change: Retrieval strategies, reasoning methods, model providers, compression techniques.

You optimize for stability where it matters and flexibility where change is inevitable.


⚖️ How fitz-ai Is Different

This isn't a critique of other tools. It's a design difference.

LangChain & Similar fitz-ai
Optimizes for Flows & prompt chains Knowledge stability
Assumes Rapid experimentation Systems live for years
Switching paradigms Often means refactoring Means changing engines
Best for Exploring ideas Building infrastructure

If you're exploring ideas, LangChain is excellent. If you're building infrastructure that will outlive your current model choices, fitz-ai is designed for that.


🚀 Quick Start

pip install fitz-ai
from fitz_ai.engines.classic_rag import run_classic_rag

answer = run_classic_rag("What does our contract say about termination?")
print(answer.text)

That's it. Classic RAG works out of the box.


⚙️ Engines

Engines encapsulate how knowledge is queried. They're not plugins. They're paradigms.

Classic RAG (Default) ✅

Production-ready retrieval-augmented generation.

from fitz_ai.engines.classic_rag import run_classic_rag

answer = run_classic_rag("What is our refund policy?")

for source in answer.provenance:
    print(f"{source.source_id}: {source.excerpt}")

CLaRa (Experimental) 🧪

Compression-native reasoning for large document collections. 16x to 128x compression with unified retrieval and generation.

from fitz_ai.engines.clara import create_clara_engine

engine = create_clara_engine()
engine.add_documents(my_documents)
answer = engine.answer(Query(text="What patterns emerge across these reports?"))

Engines are interchangeable. Your knowledge is not.


✅ When fitz-ai Makes Sense

  • Internal company knowledge bases
  • Compliance-sensitive environments
  • Teams running local and cloud LLMs
  • Long-lived systems where methods will change

❌ When fitz-ai Is Not a Fit

  • Prompt-only experiments
  • One-off demos
  • No ingestion, no retrieval needed

📁 Project Structure

fitz_ai/
├── core/        # Stable contracts (Query, Answer, Provenance)
├── engines/     # Reasoning paradigms (classic_rag, clara)
├── ingest/      # Knowledge ingestion
├── runtime/     # Engine orchestration
├── llm/         # LLM plugins
└── vector_db/   # Vector DB plugins

Architecture enforces separation: engines can be added or removed without destabilizing the core.


💻 CLI

Core Commands

Command Description
fitz init Interactive setup wizard
fitz query "question" Query your knowledge base
fitz config Show current configuration
fitz db List/inspect vector collections
fitz chunk ./file.txt Preview chunking strategies
fitz doctor System diagnostics
fitz plugins List all available plugins

Ingestion Commands

Command Description
fitz ingest ./docs collection Ingest documents into collection
fitz ingest ./docs coll --chunk-size 500 Custom chunk size
fitz ingest validate ./docs Validate before ingesting
fitz ingest plugins List ingest plugins

Database Commands

Command Description
fitz db List all collections
fitz db default Inspect 'default' collection
fitz db my_docs -n 10 Show 10 sample chunks

Chunking Preview

Command Description
fitz chunk ./doc.txt Preview with defaults (1000 chars)
fitz chunk ./doc.txt --size 500 Smaller chunks
fitz chunk ./docs/ --stats Stats only, no content
fitz chunk --list List available chunkers

Examples

# Setup and first query
fitz init
fitz ingest ./documents knowledge_base
fitz query "What are the main topics?"

# Inspect what's stored
fitz db knowledge_base

# Preview chunking before committing
fitz chunk ./large_doc.pdf --size 500 --stats

# Check system health
fitz doctor

📐 Design Principles

  • Explicit over clever | No hidden magic
  • Stable contracts | The API doesn't break when internals change
  • Knowledge outlives methods | Ingest once, query many ways
  • Engines are paradigms | Not just config switches

💡 Philosophy

RAG is a method.
Knowledge access is a strategy.

fitz-ai is built for the strategy.


📚 Documentation


📄 License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fitz_ai-0.3.4.tar.gz (144.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fitz_ai-0.3.4-py3-none-any.whl (173.5 kB view details)

Uploaded Python 3

File details

Details for the file fitz_ai-0.3.4.tar.gz.

File metadata

  • Download URL: fitz_ai-0.3.4.tar.gz
  • Upload date:
  • Size: 144.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for fitz_ai-0.3.4.tar.gz
Algorithm Hash digest
SHA256 12bd5e24f1eda49737243811cacd9529b114b0310b0060b9fda477aaee90b80d
MD5 d19c241bc1a60cecaeea1b019cacc5f6
BLAKE2b-256 5b997515c9eef9855edeb6d565c3931f0adffada332cf7b86c626adf69457aae

See more details on using hashes here.

File details

Details for the file fitz_ai-0.3.4-py3-none-any.whl.

File metadata

  • Download URL: fitz_ai-0.3.4-py3-none-any.whl
  • Upload date:
  • Size: 173.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for fitz_ai-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 55562f379324a768ff9d4fdd219f9a20beef3cfbafc91d0076b9f0c9e12029db
MD5 ed71524613b4cb554854aa8b774da0ec
BLAKE2b-256 aa681288a30429ea771d1549d68aff760625c97b1f123e60893b7c15d67eca45

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page