The Inference TimesDemo desk

RAG Demo

Ask your documents: answers grounded in a knowledge base, with a citation for every claim.

  1. Chunk
  2. Embed
  3. Store in pgvector
  4. Retrieve top-k
  5. Answer with citations

1 ·Pick a knowledge base

Each one is a real-world use case with its own documents.

Your privacy

This demo only searches the fictional sample documents above. You can't upload files, and your questions aren't stored. Each question is sent to OpenAI only to generate the answer.

2 ·Ask

Loading…

3 ·How it works

Ask a question to see each step measured.

  1. 1

    Chunk & embed (done ahead of time)

    Documents are split into ~1000-character chunks (150 overlap) and each chunk becomes a vector with an embedding model.

  2. 2

    Retrieve

    Your question is embedded too, and pgvector finds the 4 closest chunks in the knowledge base.

  3. 3

    Augment

    Those chunks go into the prompt, together with your recent turns.

  4. 4

    Generate

    The model answers only from that context and cites each source.

Why this matters

Instead of retraining a model, RAG lets it answer from your latest documents. Every answer can be checked against its source, and when the answer isn't in the documents, it says so.

4 ·Where the information comes from

The passages retrieved for the selected answer, with their document and metadata.

Ask a question, then click an answer to see its sources here.