Home Applications iris-vector-rag

iris-vector-rag

InterSystems does not provide technical support for this project. Please contact its developer for the technical assistance.
0
0 reviews
0
Awards
1
Views
0
IPM installs
0
0
Details
Releases (1)
Reviews
Issues
Production-ready RAG applications with InterSystems IRIS.

What's new in this version

Initial Release

RAG Templates - Enterprise RAG Framework

Production-ready RAG applications with InterSystems IRIS. Zero-configuration APIs, enterprise-grade architecture, and seamless LangChain integration.

πŸš€ Quick Start

Python - Zero Configuration

from rag_templates import RAG

Works immediately - no setup required

rag = RAG()
rag.add_documents(["Your documents here"])
answer = rag.query("What is machine learning?")
print(answer)

JavaScript - Zero Configuration

import { RAG } from '@rag-templates/core';

const rag = new RAG();
await rag.addDocuments(["Your documents here"]);
const answer = await rag.query("What is machine learning?");
console.log(answer);

ObjectScript Integration

// Direct IRIS integration via Embedded Python
Set bridge = ##class(RAG.PythonBridge).%New()
Set result = bridge.Query("What is machine learning?", "basic")
Write result.answer

πŸ“¦ Installation

# Python
pip install rag-templates

JavaScript/Node.js

npm install @rag-templates/core

πŸ—οΈ Core Architecture

Schema Manager

Centralized schema management with automatic migration support:

  • Universal dimension authority for all vector tables
  • Automatic schema detection and migration
  • Customizable table names and field configurations
  • Version tracking and rollback capabilities

IRISVectorStore Interface

LangChain-compatible vector store with enterprise features:

from rag_templates.storage import IRISVectorStore

Drop-in LangChain replacement

vector_store = IRISVectorStore(connection_manager, config_manager)
retriever = vector_store.as_retriever(search_kwargs={"k": 5})

Configuration System

Environment-aware configuration with validation:

from rag_templates.config import ConfigurationManager

config = ConfigurationManager()

Supports RAG_DATABASE__IRIS__HOST env vars

Automatic YAML loading with schema validation

πŸ› οΈ Available RAG Techniques

Technique Description Best For Status
basic Standard vector similarity General purpose, fast queries βœ… Production
colbert Token-level embeddings with MaxSim High precision retrieval βœ… Production*
crag Corrective RAG with self-correction Accuracy-critical applications βœ… Production
hyde Hypothetical Document Embeddings Complex reasoning tasks βœ… Production
graphrag Graph-based knowledge retrieval Structured knowledge bases βœ… Production
hybrid_ifind Multi-modal search combination Enterprise search βœ… Production
noderag Node-based structured retrieval Hierarchical data βœ… Production

*ColBERT: Includes experimental Pylate integration with pluggable backend support (native/pylate).

🎯 Developer Experience

Three-Tier API Design

Simple API - Zero configuration for prototypes:

rag = RAG()  # Works immediately

Standard API - Production configuration:

rag = ConfigurableRAG({
    'technique': 'colbert',
    'llm_provider': 'openai'
})

Enterprise API - Full control:

config = ConfigManager.from_file('enterprise-config.yaml')
rag = ConfigurableRAG(config)

Key Configuration Options

Variable Description Default
RAG_DATABASE__IRIS__HOST IRIS database host localhost
RAG_EMBEDDING__MODEL Embedding model name all-MiniLM-L6-v2
RAG_LLM__PROVIDER LLM provider openai
RAG_TECHNIQUE RAG technique to use basic

πŸ”— MCP Integration

The Multi-Cloud Platform (MCP) integration allows you to easily deploy and manage RAG services as microservices. This design enables flexible deployment across various environments and seamless integration with existing enterprise systems.

Creating MCP Servers

Create MCP servers in minutes:

import { createMCPServer } from '@rag-templates/mcp';

const server = createMCPServer({
name: "knowledge-server",
description: "Company knowledge base",
ragConfig: { technique: 'graphrag' }
});

server.start();

IRIS SQL Tool Integration

The IRIS SQL tool provides direct SQL access and advanced vector search capabilities within your MCP-deployed RAG services. It allows for efficient data manipulation and retrieval directly from InterSystems IRIS databases, leveraging its powerful SQL and vector functionalities. This integration streamlines data management for RAG applications, enabling complex queries and high-performance vector lookups.

For detailed setup and usage, refer to the MCP Integration Guide.

πŸ“š Documentation

Guide Description
πŸ“– User Guide Complete usage guide and best practices
πŸ”— MCP Integration Guide Multi-Cloud Platform integration, MCP server creation, and IRIS SQL tool usage
πŸ“‹ Documentation Additional documentation and guides

βœ… Verification

# Quick setup and validation
make setup-env && make install
make validate-iris-rag && make test-unit

Full end-to-end testing with 1000+ documents

make load-1000 && make test-1000

Performance benchmarking

make test-ragas-1000-enhanced

🌟 Key Features

  • Zero Configuration: Production-ready defaults, works immediately
  • Enterprise Architecture: Schema management, migrations, monitoring
  • LangChain Compatible: Drop-in replacement for existing workflows
  • Multi-Language: Python, JavaScript, and ObjectScript support
  • MCP-First Design: Trivial MCP server creation
  • Advanced RAG: 7+ sophisticated retrieval techniques
  • Performance Optimized: Built-in caching and optimization

πŸ“š References & Research

RAG Technique Papers & Implementations

Technique Original Paper Key Repository Additional Resources
Basic RAG Retrieval-Augmented Generation Facebook Research LangChain RAG
ColBERT ColBERT: Efficient and Effective Passage Retrieval Stanford ColBERT Pylate Integration
CRAG Corrective Retrieval Augmented Generation CRAG Implementation LangGraph CRAG
HyDE Precise Zero-Shot Dense Retrieval HyDE Official LangChain HyDE
GraphRAG From Local to Global: A Graph RAG Approach Microsoft GraphRAG Neo4j GraphRAG
NodeRAG Hierarchical Text Retrieval NodeRAG Implementation Hierarchical Retrieval

Core Technologies

🀝 Contributing

We welcome contributions! See our Contributing Guide for details.

πŸ“„ License

MIT License - see https://github.com/intersystems-community/iris-vector-rag/blob/master/LICENSE file for details.


Transform your RAG development from complex to enterprise-ready. Start building in minutes, scale to production.

Version
1.0.024 Jun, 2025
Category
Frameworks
Works with
InterSystems IRISInterSystems IRIS for HealthInterSystems Vector Search
First published
24 Jun, 2025
Last edited
24 Jun, 2025