All primitives

Intelligence / grounded answers

RAG

Let AI answer questions about your own information.

The idea

Give useful answers a source to stand on.

Imagine building an AI assistant for your company. Employees want to ask questions about policies, procedures, and internal documents.

A general-purpose AI model doesn't automatically know what's inside your private documents.

Retrieval-Augmented Generation (RAG) finds relevant passages from your information and provides them to a model as context when it answers.

Application blip

Ask Your Documents

Sample content · no live model
You

How many vacation days do employees get?

Assistant · sample response

Full-time employees receive 20 vacation days per year.

Answers are matched to the sample passages above; verify the cited source.

Try:

This is a local, rule-based sample—not a live AI model. RAG can still produce inaccurate answers, so keep citations visible and verify important claims.

Behind the scenes

Retrieve evidence before generating an answer.

  1. Question
  2. Retrieve relevant passages
  3. Send context to AI
  4. Generate a grounded answer

The application retrieves passages that match a question, passes them to the model, and keeps source citations beside the answer so a person can verify the evidence. Retrieval can improve grounding, but it doesn't guarantee factual accuracy.

What could you build?

  • Internal knowledge assistants
  • Customer support bots
  • Legal document assistants
  • Educational tutors

Implementation notes

  • Ingest and tag approved source documents.
  • Retrieve relevant passages for each question.
  • Show citations and verify important claims.

Implementing it

With a coding agent

Ask your agent to answer from your documents

Agent setup (mock link)

Copy this prompt, fill in the bracketed details, and paste it into your coding agent. It describes the goal, the source material, and the guardrails.

Bracketed text marks details only you can fill in. 954 / 6,000 characters.

Fill in:APP OR PRODUCTDOCUMENTS OR KNOWLEDGE SOURCEWHICH DOCUMENTS TO INCLUDETAGS OR METADATAUSER, WORKSPACE, OR TENANTIMPORTANT QUESTIONS, MISSING-ANSWER CASES, AND ACCESS CASES

Strong prompt · 76/100

Traditional SDK / API

Ask your documents

TypeScript
const answer = await ultrahost.rag.ask({
  collection: "employee-policies",
  question,
  citations: true,
})

Key takeaway

RAG connects AI to your information so it can answer questions using relevant source material. Citations help people verify answers, but they do not guarantee factual accuracy.

Next primitive

Graph Database