Skip to content

About

A Python framework for cited text, vector and graph retrieval on ClickHouse

Topics

Resources

Contributing

Security policy

Stars

8 stars

Watchers

1 watching

Forks

Repository files navigation

ClickHouse RAG logo

ClickHouse RAG

ClickHouse RAG is a Python framework for finding and citing evidence in ClickHouse. Use one collection for document updates, hybrid text and vector search, and relationship traversal. Compose local and hosted models for embeddings, graph extraction, planning, reranking and cited answers.

  • Use your own embeddings. Pass vectors directly or supply a Python provider.
  • Keep the latest revision searchable. The same identity and payload can be retried and higher revisions replace earlier passages.
  • Return evidence for any RAG stack. Typed search results carry stable chunk IDs, document IDs, sources and metadata.
  • Follow relationships across documents. Graph search adds cited paths and corpus overviews. Typed knowledge queries can require multiple paths to reach the same answer.

Version 1.0 replaces the old managers and requires a new table. See the migration guide for an existing setup.

GitHub Releases · Documentation · PyPI

Quickstart

The 1.x line targets CPython 3.11–3.15 and ClickHouse 26.3 or 26.8 LTS. Install the library with pip.

python -m pip install clickhouserag

Follow the quickstart to start a local server and run hybrid retrieval without a model service. To run the example from a checkout with an existing local server:

uv sync --locked
uv run --locked python examples/basic_usage.py

For document indexing, GraphRAG, KAG and evaluation, use the framework walkthrough. The model provider guide shows how to mix backends. The optional PostgreSQL add-on delivers document revisions to ClickHouse.

See the API reference, operations guide, benchmark and design.

Contributing · Changelog · MIT license

About

A Python framework for cited text, vector and graph retrieval on ClickHouse

Topics

Resources

Contributing

Security policy

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages