This application has been tested to work on Chrome and Firefox browsers only and may not work on other browsers as of now.

Scientia Laboratory

An interactive playground for Retrieval-Augmented Generation (RAG). Experiment with private data, compare models, and visualize retrieval metrics in real-time.

⚑ Quick Start

5 min read

Get up and running with your own documents in minutes.

  • Sign In
  • Upload Docs
  • Build Index
  • Ask Question

Detailed Steps:

  1. Access: Navigate to the /laboratory page. Sign in if required.
  2. Upload: Drag & drop your PDF/TXT/MD files into the upload zone (max 32MB/file).
  3. Index: Click the Build index button and wait for "Indexed: yes".
  4. Query: Type your question (e.g., "What does the policy say about vacation?") and hit Run.

🧠 Understanding RAG Modes

Scientia offers three distinct modes depending on your research needs.

ModeBest ForOutput
SimpleGeneral Q&A, SummarizationSingle answer + Citations
A/B CompareModel evaluation, Prompt testingTwo side-by-side answers
GraphMulti-hop reasoning, Complex relationshipsGraph-traversed answer
Pro Tip: Use Simple Mode with "Doc + world context" if your questions require outside knowledge not found in your documents.

πŸ“‚ Document Management

Supported Formats

  • PDF (.pdf)
  • Text (.txt)
  • Markdown (.md)

Max 20 files total.

Privacy & Storage

  • Ephemeral: Sessions auto-clear after 30 mins.
  • In-Memory: Data is not persisted to disk.
  • Private: Your index is isolated to your session ID.

βš™οΈ Query Configuration

Fine-tune your retrieval pipeline using the controls panel.

Top-k Passages (Default: 4)

Controls how many document chunks are retrieved for the LLM. Increase for complex questions, decrease for speed.

Temperature (0.0 - 1.0)

Controls randomness. 0.0 is deterministic/factual; 1.0 is creative. Recommended: 0.1 for RAG.

Rerank Strategy

Cross-encoder: Slower but more accurate re-ordering.
LLM: Uses the model itself to pick the best chunks.

Verification

Decide how the answer is verified: Skip verification, RAG-V cross-check (default), or Fact-check LLM.

πŸ“ Answer Display & Sources

When a query runs successfully, an Answer panel appears:

  • Simple Mode: Streams tokens and may show citations.
  • A/B Mode: Shows two side-by-side answers labeled "A" and "B".
  • Graph Mode: Labeled "Graph RAG answer", showing multi-hop traversal results.

A Sources area lists the retrieved document chunks used to generate the answer, enabling users to review evidence.

πŸ“Š Evaluation & Metrics

The system automatically assesses multiple quality dimensions and displays scores on a 0–10 scale:

MetricWhat it measures
Answer RelevanceHow well the answer addresses the question. A higher score means the answer stays on topic.
FaithfulnessWhether the answer's statements are backed by the retrieved sources. A perfect 10 indicates no hallucinations.
Context PrecisionThe proportion of the retrieved context that is actually used in the answer. Lower scores imply more irrelevant context.
Context RecallHow much of the relevant information from the sources has been used.
CompletenessWhether the answer covers all important aspects of the question.
ConcisenessMeasures brevityβ€”high scores indicate the answer isn't overly verbose.

Diagnostics Tools

Click to re-evaluate after parameter tweaks.

βœ… Verification Summary

A Verification section summarizes whether the answer is supported by the retrieved context.

Mode
RAG-V
Coverage
100%
Claims backed by context

πŸ” Diagnostics Trace

Beneath the evaluation panel is a diagnostics section with a Show trace toggle.

Show trace expanded...
Full prompt text...
Generated answer...

Useful for debugging prompt issues or understanding how the model formed the answer.

πŸ–₯️ System Monitoring

Metrics Drawer

Click Show metrics in the header to reveal session statistics: events, average latency, and query history.

API Status

Check the API Status card at the bottom of the lab for connectivity health.

Metrics Summary

Displays aggregate counts at the footer: Total sessions, Total indices, Queries by mode, and System version.

πŸš€ Key User Workflows

Quick Start: Ask a question
  1. Sign in and set theme.
  2. Upload documents (PDF/TXT/MD).
  3. Click Build Index. Wait for "Indexed: yes".
  4. Enter question and click Run (Simple Mode).
  5. Review answer, citations, and evaluation metrics.
Comparing Models (A/B)
  1. Select A/B tab.
  2. Adjust parameters (Top-k, Temperature) if desired.
  3. Click Run A/B.
  4. Compare side-by-side answers and metrics to decide the winner.
Multi-hop Answers (Graph)
  1. Select Graph tab.
  2. Adjust Max graph hops (1-4).
  3. Click Run Graph RAG.
  4. Inspect the graph traversal path and answer.

πŸ”§ Troubleshooting / FAQ

Indexed = no after uploading files

Click Build index to enable querying. Uploading alone does not index the files.

Comparing... never finishes (A/B mode)

The underlying models may be busy. Try a simpler question or check system status.

Low Context Precision or Recall

Try adjusting Top-k passages to retrieve more context, or refine your query wording.

Why does sign-in hang on Safari?

Strict privacy features may block scripts. Please use Chrome or Firefox for the best experience.