RAG System

Beta

Retrieval-Augmented Generation — AI that talks to your data

What is RAG?

RAG combines information retrieval with AI generation. Your documents are indexed, semantically searched, and used as context for AI responses — enabling accurate, source-backed answers from your own data.

How RAG works

1
Index documents
Upload and chunk your documents into searchable segments with vector embeddings.
2
Semantic search
Find relevant information using meaning-based search with relevance scoring.
3
AI chat
The AI generates responses using retrieved context from your documents.

RAG workflow

Step 1: Create conversation
POST/api/v1/context/conversations/create
Request
{
  "title": "Product Documentation Q&A",
  "knowledgeBaseType": "custom"
}
Step 2: Index documents
POST/api/v1/rag/index
Request
{
  "conversationId": "conv_abc123",
  "documentText": "TarqaAI is a unified AI platform...",
  "metadata": {
    "source": "product-docs",
    "category": "features"
  }
}
Step 3: RAG chat
POST/api/v1/rag/chat
Request
{
  "conversationId": "conv_abc123",
  "message": "What AI models does TarqaAI support?",
  "model": "gemini-2.5-flash",
  "topK": 3
}