Back to directory

RAG-FiT

A modular Python library for improving how large language models use retrieved information, by generating RAG-augmented training datasets, fine-tuning models on them with parameter-efficient methods, and measuring the result with RAG-specific metrics.

RAG-FiT

RAG-FiT is a library for improving a large language model's ability to use external information by fine-tuning on specially created retrieval-augmented generation datasets. It covers four stages: creating a dataset from a chosen RAG technique, including retrieval, ranking, query manipulation and prompt generation; training a model on that dataset with parameter-efficient fine-tuning; running inference with a trained or untrained model; and evaluating the generated output against a configurable list of metrics.

Dataset creation persists RAG interactions in a consistent, model-independent format alongside their metadata, so the same pipeline can be reused across experiments. Evaluation metrics include exact match, F1, ROUGE, BERTScore, RAGAS and classification metrics, computed either per example or across the whole dataset, and custom metrics can be added. Workflows are configured through configuration files rather than code changes, and trained models can be pushed to the Hugging Face Hub.

It installs as an editable Python package, with optional extras for Haystack and DeepEval integrations, and was formerly named RAG Foundry.

More in RAG

See all 540
  • ai·rete·rag

    ai-rete-rag.com

    A platform that pairs a Rete rule engine with retrieval-augmented generation, so deterministic rules decide an outcome and grounded retrieval explains the decision in plain language.

  • Xtriever

    github.com

    A hybrid retrieval engine for retrieval-augmented generation, written in Rust to run on-device on a phone or a laptop, combining lexical BM25 search, dense embedding search, reciprocal-rank fusion and cross-encoder re-ranking with no server.

  • FileFlux

    github.com

    A .NET library that turns PDF, DOCX, HWP and other documents into optimized chunks for RAG systems, through a five-stage pipeline built on high-performance Rust FFI readers.