RAT-retrieval-augmented-thinking  by Doriandarko

AI tool enhancing responses via structured reasoning and retrieval

created 6 months ago
655 stars

Top 52.0% on sourcepulse

GitHubView on GitHub
Project Summary

RAT (Retrieval Augmented Thinking) enhances AI responses by separating reasoning from generation, using DeepSeek for structured thought processes and other models for final output. This tool is designed for users seeking more insightful, context-aware, and reliable AI-generated content.

How It Works

RAT employs a two-stage architecture. First, DeepSeek generates a detailed reasoning process for a given query. Second, this reasoning is passed as context to a response model (selectable via OpenRouter) to formulate the final answer. This separation allows for explicit control and visibility over the AI's "thinking," leading to more robust and transparent outputs. A specialized version also exists for Claude models, integrating the reasoning as internal thought processes.

Quick Start & Requirements

  • Install via pip: pip install -e . (after cloning)
  • Requires Python 3.11+
  • Requires a .env file with DEEPSEEK_API_KEY and OPENROUTER_API_KEY. ANTHROPIC_API_KEY is optional.
  • Usage: rat from the command line.

Highlighted Details

  • Flexible model selection via OpenRouter.
  • Toggleable reasoning visibility.
  • Maintains conversation context.
  • Specialized Claude version leveraging message prefilling.

Maintenance & Community

The project is available on GitHub. Contribution guidelines are provided, encouraging pull requests.

Licensing & Compatibility

Licensed under the MIT License. Requires attribution to "Skirano" and the GitHub repository if used in projects.

Limitations & Caveats

Requires API keys for DeepSeek and OpenRouter, implying associated costs. The "Claude-Specific Version" is noted as specialized.

Health Check
Last commit

6 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
34 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Calvin French-Owen Calvin French-Owen(Coounder of Segment), and
2 more.

ReAct by ysymyth

0.7%
3k
GPT-3 prompting code for ReAct research paper
created 2 years ago
updated 1 year ago
Feedback? Help us improve.