← Issue #1RAG X-RAY

RAG X-Ray

Ask about Rohan's work and see retrieval-augmented generation happen, panel by panel: what the search reads, which case files it pulls, and how the answer is built only from them.

0 / 300

1 The question

Roughly what the search sees:

kept + added synonym dropped

Keyword search can't read meaning, only words. So the question is lower-cased, filler words like "what" and "has" are dropped, and a few everyday words pick up the words the case files actually use.

2 The search

The library: 18 case-file cards

    Top matches BM25 score · bar = relative to the best

      BM25 is classic keyword search: a card scores higher the more of your words it contains, rare words count for more than common ones, and long cards don't win just by being long.

      3 The context

      These excerpts, and nothing else, are handed to the model. Highlighted words matched your question.

        4 The answer

        The rules Claude gets: answer only from panel 3, cite the ids you used, and politely decline anything that isn't about Rohan's work.

        Under the hood
        1. The library. 18 short "case-file" chunks are generated from this site's own content: each project card, each job, education, skills and the site itself.
        2. The search. Your question is lower-cased, common filler words are dropped, a few everyday words get synonyms (study → education), and BM25 keyword search scores every chunk. The top 4 win. No embeddings, no vector database: just counting words, carefully.
        3. The answer. Those 4 excerpts go to Claude Haiku 5.5 with strict instructions: answer only from them, cite the ids you used, and politely decline anything that isn't about Rohan's work.
        4. Honesty. If the AI is offline or the monthly budget is spent, the search still runs and you see the real matches, just without a written answer. This server does not keep your question.

        Gadget Lab · built by Rohan Srivastava with Claude · original art, no studio IP