Ask Anything
Drop in any document, PDF, or URL. Then ask it anything. A live RAG pipeline - retrieval-augmented generation in your browser.
Overview
What is RAG?
Retrieval-Augmented Generation (RAG) is one of the most practically useful patterns in applied AI. Instead of relying pureply on what a language model was trained on, RAG grounds the model's responses in a specific document of knowledge source you provide - making answers accurate, specific, and verifiable.
This demo lets you experience that pipeline directly. Paste in a contract, upload a research paper, drop in a news article URL - then ask questions and get answers grounded in that exact content. No hallucinations about things not in the document. No generic responses.
Under the hood, the document is passes as context to Claude via the Anthropic API, with a system prompt engineered to keep responses grounded, cite specific sections, and flag when something isn't in the document.
How It Works
You provide a document - plain text, a PDF file, or any publicly accessible URL. The content is extracted and cleaned.
The document is passed as context in the system prompt, with instructions to ground all answers in the provided content.
When you ask a question, Claude retrieves the relevant parts of the context and generate a grounded, cited response.
The full conversation history is maintained so you can ask follow-up questions and dig deeper into the document.
What I Learned
Prompt engineering matters enormously for RAG - the difference between a grounded response and a hallucinated on is often just the system prompt.
PDF text extraction is messier than expected - tables, headers, and multi-column layouts all need special handeling to produce clean context.
Conversation history management is critical - including too much history bloats the context window, too little loses coherence.
Next Project
Arkive