Metadata-Version: 2.4
Name: klea_rag
Version: 0.6.0
Summary: Domain-configurable RAG pipeline for scientific research
Home-page: https://github.com/NeuroML/klea
Author: Ankur Sinha
Author-email: ankursinha@fedoraproject.org
License: MIT
Project-URL: Documentation, https://klea.science
Project-URL: Source, https://github.com/NeuroML/klea
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: klea_utils[rerank]>=0.6.0
Requires-Dist: langchain
Requires-Dist: langchain-core
Requires-Dist: typer<0.27,>=0.12
Requires-Dist: fastmcp
Provides-Extra: chroma
Requires-Dist: klea_utils[chroma]; extra == "chroma"
Provides-Extra: pgvector
Requires-Dist: klea_utils[pgvector]; extra == "pgvector"
Provides-Extra: qdrant
Requires-Dist: klea_utils[qdrant]; extra == "qdrant"
Provides-Extra: ollama
Requires-Dist: klea_utils[ollama]; extra == "ollama"
Provides-Extra: huggingface
Requires-Dist: klea_utils[huggingface]; extra == "huggingface"
Provides-Extra: nicegui
Requires-Dist: klea_utils[nicegui]; extra == "nicegui"
Provides-Extra: tui
Requires-Dist: klea_utils[tui]; extra == "tui"
Provides-Extra: full
Requires-Dist: klea_rag; extra == "full"
Requires-Dist: klea_rag[chroma]; extra == "full"
Requires-Dist: klea_rag[pgvector]; extra == "full"
Requires-Dist: klea_rag[qdrant]; extra == "full"
Requires-Dist: klea_rag[ollama]; extra == "full"
Requires-Dist: klea_rag[huggingface]; extra == "full"
Requires-Dist: klea_rag[nicegui]; extra == "full"
Requires-Dist: klea_rag[tui]; extra == "full"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-asyncio; extra == "test"
Requires-Dist: langchain-ollama; extra == "test"
Requires-Dist: klea_rag[full]; extra == "test"
Provides-Extra: dev
Requires-Dist: klea_rag[test]; extra == "dev"
Requires-Dist: pre-commit; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: ty; extra == "dev"
Dynamic: license-file

# Klea RAG

Knowledge vaLidated Expert AI Assistant for scientific research.

This package is Klea's retrieval-augmented generation component: a
configurable, multi-domain pipeline built on LangGraph.  Each query is
classified into a domain, retrieved from that domain's stores, answered
from the retrieved context, and evaluated (with optional improve loops).

Features:

- multi-domain support with automatic query classification
- hybrid retrieval over vector stores (Chroma, Qdrant, PGVector) and BM25,
  fused with Reciprocal Rank Fusion and optional cross-encoder reranking
- answer evaluation with iterative improvement loops
- MCP tool integration for live data access
- FastAPI server, Textual terminal UI (`klea-rag` / `klea-rag tui`), and
  NiceGUI web UI (`klea-rag web`)

Funded by the [BioFAIR](https://biofair.uk/) Pathfinder project
("Creating AI-enabled analysis pipelines for FAIR neuroscience data").

Documentation: https://klea.science/components/rag.html
