raft

RAFT, or Retrieval-Augmented Fine-Tuning, is a method comprising of a fine-tuning and a RAG-based retrieval phase. It is particularly suited for the creation of

What is raft?

RAFT, or Retrieval-Augmented Fine-Tuning, is a method comprising of a fine-tuning and a RAG-based retrieval phase. It is particularly suited for the creation of agents that realistically emulate a specific human target.

Overview of raft

What it is

RAFT (Retrieval-Augmented Fine-Tuning) is a method that combines fine-tuning with a RAG-based retrieval phase. It is designed for creating agents that realistically emulate a specific human target. The repository includes tools for importing data from various sources, training a persona model, and generating responses with recall.

Key features

  • Combines fine-tuning with RAG retrieval to emulate a specific human target.
  • Imports data from Substack, LessWrong, EA Forum, Twitter/X, RSS feeds, URLs, and PDFs via the raft fetch command.
  • Supports thinking models with recall in the thinking phase using --thinking.
  • Uses quote-anchored recall: recollections must cite verbatim sentences from source material.
  • Provides raft comment to generate a persona's comment on a given post or text.
  • Allows separate API endpoints for the persona model, helper LLM, and embeddings.

Use cases

  • Creating conversational agents that mimic specific individuals based on their public writing.
  • Building personas from forum comments, blog posts, tweets, and other text sources.
  • Research on language model behavior and the ability to emulate deterministic patterns.

Getting started

Install the package via pip: pip install -U raft-ft Example usage: import a Substack blog as a persona: raft fetch substack --blog garymarcus For detailed instructions, see the repository README.

License and pricing

License: MIT. Open source.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/lumpenspaceraft.svg)](https://yunodb.com/tools/lumpenspaceraft?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/lumpenspaceraft?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/lumpenspaceraft.svg" alt="Featured on YunoDB" height="20"></a>