Building Production RAG Systems in Days, Not Weeks: Introducing ShinRAG

Published: (December 2, 2025 at 08:06 AM EST)
3 min read
Source: Dev.to

Source: Dev.to

Building a production‑ready Retrieval‑Augmented Generation (RAG) system often takes 6–12 weeks, not because the RAG logic is complex, but because of the surrounding infrastructure: vector databases, embedding pipelines, orchestration code, chunking strategies, and API integrations.

ShinRAG is a visual RAG platform that lets you focus on application logic and ship production‑grade RAG systems in days instead of weeks.

Challenges of Building Production RAG Systems

  • Infrastructure complexity – setting up vector stores, embedding services, and orchestration layers.
  • Time investment – 6–12 weeks from idea to production.
  • Maintenance overhead – constant debugging and optimization.
  • Vendor lock‑in – hard to switch tools or providers.

Introducing ShinRAG

ShinRAG is an all‑in‑one, managed RAG platform that provides:

  • Visual pipeline builder (drag‑and‑drop RAG workflows)
  • Managed vector database (powered by Qdrant)
  • RAG agents with dataset assignment
  • Full REST API for production use
  • TypeScript SDK for easy integration
  • Usage tracking and monitoring

Installation

npm install @shinrag/sdk
# or
pnpm add @shinrag/sdk

Basic Usage

Query an Agent

import { ShinRAGClient } from '@shinrag/sdk';

const client = new ShinRAGClient({
  apiKey: 'sk_your_api_key_here',
});

const result = await client.queryAgent('agent_1234567890abcdef', {
  question: 'What are the key features mentioned in the documentation?',
  maxResults: 5,
  temperature: 0.7,
});

console.log('Answer:', result.answer);
console.log('Sources:', result.sources);
console.log('Tokens used:', result.tokensUsed);

The agent automatically:

  • Searches the assigned datasets
  • Retrieves relevant context
  • Generates an answer with citations
  • Tracks token usage

Query a Pipeline

const pipelineResult = await client.queryPipeline('pipeline-id', {
  input: 'Process this query through my custom pipeline',
});

if (pipelineResult.status === 'completed') {
  console.log('Output:', pipelineResult.output);
  console.log('Total tokens:', pipelineResult.totalTokensUsed);

  // Inspect individual node results
  pipelineResult.nodeResults.forEach(node => {
    console.log(`Node ${node.nodeId}: ${node.status}`);
    if (node.output) {
      console.log(`  Output: ${node.output}`);
    }
  });
}
const searchResult = await client.queryDataset({
  datasetId: 'dataset_1234567890abcdef',
  queryText: 'What are the key features?',
  limit: 10,
});

if (searchResult.success) {
  console.log(`Found ${searchResult.results.length} results`);
  searchResult.results.forEach(item => {
    console.log(`Score: ${item.score}, Content: ${item.payload.text}`);
  });
}

Advanced Features

Metadata Filters

const result = await client.queryAgent('agent-id', {
  question: 'Find information about TypeScript',
  filter: {
    must: [
      { key: 'category', match: { value: 'programming' } },
      { key: 'difficulty', range: { gte: 1, lte: 3 } },
    ],
  },
});

TypeScript Types

interface QueryAgentResponse {
  answer: string | null;
  sources: Array;
  tokensUsed: number;
  model: string;
  warning?: string;
}

Error Handling

import { ShinRAGClient, ShinRAGError } from '@shinrag/sdk';

try {
  const result = await client.queryAgent('agent-id', {
    question: 'Your question here',
  });
} catch (error) {
  if (error instanceof ShinRAGError) {
    console.error('API Error:', error.message);
    console.error('Status Code:', error.statusCode);
  }
}

Use Cases

  • Internal knowledge base – upload company docs, create an agent, query via API or chat integrations.
  • Customer support bot – ingest support FAQs, apply filters, deploy to your support system.
  • Technical documentation Q&A – separate agents per topic, use filter templates to route queries.

Architecture & Technology Stack

ComponentTechnology
APINestJS
Vector storageQdrant
LLM providersOpenAI, Anthropic, custom APIs
SDKTypeScript (with full type safety)
API styleRESTful
Monitoring & analyticsBuilt‑in usage tracking

Roadmap

  • Additional pipeline node types
  • Streaming responses
  • SDKs for Python, Go, and other languages
  • Enhanced monitoring & analytics dashboards
  • Integration marketplace

Getting Started

  1. Sign up at shinrag.com (or deploy your own instance).
  2. Create your first dataset and upload documents.
  3. Build an agent and assign the dataset(s).
  4. Install the SDK (npm install @shinrag/sdk).
  5. Start querying!

Tags

#rag #ai #typescript #machinelearning #developer #api #nlp #vectordatabase

Back to Blog

Related posts

Read more »