DEV Community

Nikola Gigić
Nikola Gigić

Posted on

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

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

Building a production-ready RAG (Retrieval-Augmented Generation) system typically takes 6-12 weeks. But here's the thing: most of that time isn't spent on the actual RAG logic—it's spent on infrastructure.

You spend weeks on:

  • Setting up vector databases
  • Building embedding pipelines
  • Writing orchestration code
  • Debugging chunking strategies
  • Managing API integrations

The actual RAG logic? That's maybe 20% of the work.

That's why we built ShinRAG — a visual RAG platform that lets you build and deploy production RAG systems in days instead of weeks.

What is ShinRAG?

ShinRAG is an all-in-one RAG platform that combines:

  • Visual pipeline builder for 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

The Problem It Solves

Most teams building RAG systems face the same challenges:

  1. Infrastructure complexity: Setting up vector databases, embedding services, and orchestration layers
  2. Time investment: 6-12 weeks to go from idea to production
  3. Maintenance overhead: Constant debugging and optimization
  4. Vendor lock-in: Hard to switch between tools and providers

ShinRAG solves these by providing a managed platform where you focus on your application logic, not infrastructure.

Getting Started with ShinRAG

Installation

npm install @shinrag/sdk
# or
pnpm add @shinrag/sdk
Enter fullscreen mode Exit fullscreen mode

Basic Usage

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

const client = new ShinRAGClient({
  apiKey: 'sk_your_api_key_here',
});
Enter fullscreen mode Exit fullscreen mode

Query an Agent

The simplest way to use ShinRAG is through RAG agents. Create an agent, assign datasets, and start querying:

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);
Enter fullscreen mode Exit fullscreen mode

The agent automatically:

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

Execute a Pipeline

For more complex workflows, use visual pipelines:

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}`);
    }
  });
}
Enter fullscreen mode Exit fullscreen mode

Search Datasets Directly

You can also perform semantic search on your datasets:

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}`);
  });
}
Enter fullscreen mode Exit fullscreen mode

Key Features

1. Visual Pipeline Builder

Build complex RAG workflows visually. Drag and drop nodes, configure connections, and deploy without writing orchestration code.

2. Bring Your Own API Keys

Use your own OpenAI, Anthropic, or other LLM API keys. You keep control of costs and providers.

3. Advanced Filtering

Filter search results using 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 } }
    ]
  }
});
Enter fullscreen mode Exit fullscreen mode

4. TypeScript-First SDK

Full TypeScript support with type safety and IntelliSense:

interface QueryAgentResponse {
  answer: string | null;
  sources: Array<{
    dataset: string;
    score: number;
    text: string;
  }>;
  tokensUsed: number;
  model: string;
  warning?: string;
}
Enter fullscreen mode Exit fullscreen mode

5. Error Handling

The SDK provides typed errors for better debugging:

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);
  }
}
Enter fullscreen mode Exit fullscreen mode

Real-World Use Cases

Internal Knowledge Base

Build a knowledge base for your team:

  1. Upload company documentation
  2. Create an agent assigned to the dataset
  3. Query via API or integrate into Slack/Discord

Customer Support Bot

Create a support agent:

  1. Ingest support documentation and FAQs
  2. Create an agent with appropriate filters
  3. Deploy via API to your support system

Document Q&A System

Build a Q&A system for technical documentation:

  1. Upload technical docs
  2. Create multiple agents for different topics
  3. Use filter templates to route queries

Why Choose ShinRAG Over Building Custom?

Custom Build ShinRAG
6-12 weeks development 3 days to production
Infrastructure management Fully managed
Complex orchestration code Visual builder
Manual debugging Built-in monitoring
High maintenance Low maintenance

Architecture Highlights

  • Built with NestJS for the API
  • Uses Qdrant for vector storage
  • Supports multiple LLM providers
  • TypeScript SDK for type safety
  • RESTful API design
  • Usage tracking and analytics

Getting Started

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

What's Next?

We're actively developing:

  • More pipeline node types
  • Streaming responses
  • Additional SDK languages (Python, Go)
  • Enhanced monitoring and analytics
  • Integration marketplace

Conclusion

RAG shouldn't require a PhD in distributed systems. ShinRAG lets you focus on building your application while it handles the infrastructure.

Whether you're building an internal knowledge base, a customer support bot, or a document Q&A system, ShinRAG can help you ship faster.

Try it out and let us know what you think. We're building in public and would love your feedback.

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


Have questions or feedback? Drop a comment below or reach out on Twitter

Top comments (0)