gitwtfhub

wtf is rag-decision-diagnoser?

suyashpradhan/rag-decision-diagnoser — explained in plain English

Analysis updated 2026-05-18

0JavaScriptAudience · developerComplexity · 2/5Setup · easy

TL;DR

A browser only tool that recommends whether to use RAG, long context, fine tuning, or hybrid, using a fixed decision tree.

Mindmap

mindmap
  root((rag-decision-diagnoser))
    What it does
      Client side decision tool
      Chooses RAG vs long context vs fine tune vs hybrid
      Deterministic decision tree
    Tech stack
      TypeScript
      Next.js
      React
    Use cases
      Pick architecture for a support bot
      Compare cost tradeoffs
      Explain confidence scoring
    Audience
      AI engineers
      Product builders
    Concepts
      Preset scenario verdicts
      Research backed tradeoffs
      Visible decision path

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Decide whether a new AI feature needs RAG, long context, fine tuning, or a hybrid setup.

REASON 2

Walk through a questionnaire and see the exact decision tree path behind the recommendation.

REASON 3

Compare rough cost tradeoffs between architecture options before committing to one.

What's in the stack?

TypeScriptNext.jsReact

How it stacks up

suyashpradhan/rag-decision-diagnoser00kaku/gallery-slider-block3rd-eden/ircb.io
Stars0
LanguageJavaScriptJavaScriptJavaScript
Last pushed2021-05-192016-11-16
MaintenanceDormantDormant
Setup difficultyeasyeasyeasy
Complexity2/52/52/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Wtf does this do

This project is a single page web app that helps someone decide which approach to use when building an AI system that needs outside information: retrieval augmented generation (RAG), long context, fine tuning, or a mix of these called hybrid. It runs entirely in the browser, with no backend server, no calls to any AI model or API, no environment variables, and no database. Every answer it gives comes from a fixed decision tree written in code, so the same inputs always produce the same verdict. The tool walks a user through a set of questions and then shows a recommendation along with the exact path through the decision tree that led to it, so the reasoning is visible rather than hidden. It also scores how confident it is in that answer, since different signals in the questionnaire can either agree with each other or point in different directions. The decision tree follows a set order of preferences. Long context is favored for a small, single document that needs deep analysis. A hybrid approach is chosen when both the system's knowledge and its behavior need fixing. Retrieval is used when the answer must cite sources, and it escalates to hybrid if the underlying problem is also behavioral. Fine tuning is reserved for behavior problems that are stable over time. The tool also handles cases where retrieval can be skipped entirely, such as a tiny and stable set of facts that fits in a single prompt. A cost comparison feature is included, but the project is upfront that its cost numbers are demonstration assumptions from a product brief, not real vendor pricing or guaranteed benchmark results. The comments in the code point to several published research papers that back up the general shape of these tradeoffs, covering topics like retrieval versus long context, how language models handle long inputs, fine tuning versus retrieval, and faithfulness in RAG citations. Five ready made example scenarios are built in, such as a customer support bot, a brand voice email writer, a legal contract analyzer, a medical assistant needing current research, and an internal company question and answer tool, each resolving to one of the four architecture choices. It can be run locally with npm or deployed with no extra configuration on Vercel.

Yoink these prompts

Prompt 1
Walk me through how this decision tree chooses between RAG, long context, fine tuning, and hybrid.
Prompt 2
Help me answer the questionnaire for a customer support bot and explain the resulting verdict.
Prompt 3
Explain how confidence scoring works when different signals in the questionnaire disagree.
Prompt 4
Show me how the cost comparator's assumptions differ from real vendor pricing.

Frequently asked questions

wtf is rag-decision-diagnoser?

A browser only tool that recommends whether to use RAG, long context, fine tuning, or hybrid, using a fixed decision tree.

What language is rag-decision-diagnoser written in?

Mainly JavaScript. The stack also includes TypeScript, Next.js, React.

How hard is rag-decision-diagnoser to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is rag-decision-diagnoser for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.