Skip to main content

Enterprise Hybrid RAG SDK with entity-centric extraction, zero-loss architecture, complete source attribution, constraint solver, temporal consistency, and multi-cloud deployment

Project description

VRIN Hybrid RAG SDK v0.7.0

Enterprise-grade Hybrid RAG system with hybrid cloud architecture, multi-hop constraint solver, temporal fact consistency, conversation state, user-defined AI specialization, and blazing-fast performance.

๐Ÿ—๏ธ Hybrid Cloud Architecture

VRIN supports two deployment models:

  • General Users (vrin_ API keys): Cost-effective shared infrastructure
  • Enterprise Users (vrin_ent_ API keys): 100% private infrastructure with data sovereignty

๐Ÿ›ก๏ธ Data Sovereignty Guarantee: Enterprise customer data NEVER leaves their cloud account

๐Ÿš€ New in v0.7.0 - Multi-Hop Constraint Solver with Temporal Fact Consistency

  • ๐Ÿงฉ LLM-BASED CONSTRAINT EXTRACTION - Intelligent identification of temporal, numerical, entity, comparison, and aggregation constraints
  • โฐ TEMPORAL FACT VALIDITY - Facts with temporal metadata (valid_from, valid_to, status, version)
  • ๐Ÿ”„ AUTOMATIC CONFLICT RESOLUTION - Smart fact supersession with version history
  • ๐Ÿ“… TEMPORAL FILTERING - Query facts valid at specific points in time or date ranges
  • ๐ŸŽฏ MULTI-CONSTRAINT QUERIES - Handle complex queries with multiple simultaneous constraints
  • ๐Ÿ“Š FIRST-IN-INDUSTRY - First RAG system with explicit temporal fact validity tracking

What This Solves

  • โœ… "What was Cadence stock value in 2010 and 2011?" - Multi-year temporal queries
  • โœ… "Calculate percentage increase from 2010 to 2015" - Date range aggregations
  • โœ… "Show revenue greater than $50M in Q2 2023" - Temporal + numerical constraints
  • โœ… Automatic handling of conflicting facts (old values superseded by new ones)
  • โœ… Complete fact history with version tracking

๐Ÿš€ v0.6.0 Features - Conversation State & Context Maintenance

  • ๐Ÿ’ฌ CONVERSATION STATE - Multi-turn conversations with automatic context maintenance
  • ๐Ÿ”„ Session Management - Stateful conversations like ChatGPT/Claude
  • ๐Ÿง  Entity Tracking - Entities tracked across conversation turns
  • ๐Ÿ“ Context Awareness - Natural follow-up questions with full context
  • โฑ๏ธ Session Persistence - 24-hour conversation sessions with auto-compression
  • ๐ŸŽฏ Improved Retrieval - Better results using conversation context

๐Ÿš€ v0.4.0 Features - Hybrid Cloud & Performance Breakthrough

  • ๐Ÿ—๏ธ HYBRID CLOUD COMPLETE - Enterprise private infrastructure with data sovereignty
  • ๐Ÿ”„ API Key Routing - vrin_ shared vs vrin_ent_ private infrastructure
  • โ˜๏ธ Azure Integration - CosmosDB with Gremlin API for enterprise customers
  • ๐Ÿข Enterprise Portal - Organization, user, and API key management
  • โšก Performance Revolution - Raw fact retrieval in <2s (96.3% faster than full analysis)
  • ๐Ÿš€ Dual-Speed Processing - Fast website display + comprehensive expert analysis
  • ๐Ÿง  User-Defined Specialization - Create custom AI experts for any domain
  • ๐Ÿ”— Multi-Hop Reasoning - Cross-document synthesis with reasoning chains
  • ๐Ÿ“Š Enhanced Graph Retrieval - Fixed Neptune storage, now finding 36-50 facts vs 0
  • ๐ŸŽฏ Expert-Level Performance - 8.5/10 validation against professional analysis
  • ๐Ÿ—๏ธ Production Infrastructure - 7 Lambda functions optimized (Python 3.12)
  • ๐Ÿ’พ Smart Storage - 40-60% reduction through intelligent deduplication
  • ๐Ÿ”’ Enterprise Security - Bearer token auth, user isolation, compliance ready

๐Ÿš€ Core Features

  • ๐Ÿ’ฌ Conversation State - Multi-turn conversations with automatic context maintenance (NEW v0.6.0)
  • ๐Ÿ—๏ธ Hybrid Cloud Architecture - Customer choice of infrastructure (shared vs private)
  • ๐Ÿ›ก๏ธ Data Sovereignty - Enterprise data stays in customer cloud account
  • โšก Hybrid RAG Architecture - Graph reasoning + Vector similarity search
  • ๐Ÿง  User-Defined AI Experts - Customize reasoning for any domain
  • ๐Ÿ”— Multi-Hop Reasoning - Cross-document synthesis and pattern detection
  • ๐Ÿ“Š Advanced Fact Extraction - High-confidence structured knowledge extraction
  • ๐Ÿ” Expert-Level Analysis - Professional-grade insights with reasoning chains
  • ๐Ÿข Enterprise Portal - Complete organization and user management
  • ๐Ÿ“ˆ Enterprise-Ready - User isolation, authentication, and production scaling

๐Ÿ“ฆ Installation

pip install vrin==0.7.0

๐Ÿ”ง Quick Start

from vrin import VRINClient

# For general users (shared infrastructure)
client = VRINClient(api_key="vrin_your_api_key")

# For enterprise users (private infrastructure with data sovereignty)
from vrin import VRINEnterpriseClient
enterprise_client = VRINEnterpriseClient(api_key="vrin_ent_your_enterprise_key")

# STEP 1: Define your custom AI expert
result = client.specialize(
    custom_prompt="You are a senior M&A legal partner with 25+ years experience...",
    reasoning_focus=["cross_document_synthesis", "causal_chains"],
    analysis_depth="expert"
)

# STEP 2: Insert knowledge with automatic fact extraction (NEW v0.7.0: temporal metadata)
result = client.insert(
    content="In 2010, Cadence stock was $100. In 2011, it increased to $150.",
    title="Financial Data with Temporal Facts"
)
print(f"โœ… Extracted {result['facts_count']} facts with temporal metadata")
print(f"๐Ÿ’พ Storage: {result['storage_details']}")
print(f"๐Ÿ”„ Conflicts handled: {result.get('storage_result', {}).get('updated_facts', 0)} superseded")

# STEP 3A: Fast fact retrieval for website display (v0.4.0)
raw_response = client.get_raw_facts_only("What are strategic insights?")
print(f"โšก Lightning-fast retrieval: {raw_response['search_time']}")  # ~0.7-2s
print(f"๐Ÿ“Š Facts found: {raw_response['total_facts']}")

# STEP 3B: Complete expert analysis for comprehensive reports
response = client.query("What are the strategic litigation opportunities?")
print(f"๐Ÿ“ Expert Analysis: {response['summary']}")
print(f"๐Ÿ”— Multi-hop Chains: {response['multi_hop_chains']}")
print(f"๐Ÿ“Š Cross-doc Patterns: {response['cross_document_patterns']}")
print(f"โšก Full Analysis: {response['search_time']}")  # ~15-20s

# NEW v0.7.0: Temporal and constraint-based queries
temporal_response = client.query("What was Cadence stock value in 2010 and 2011?")
print(f"๐Ÿ“… Temporal Query Results:")
print(f"  Constraints identified: {temporal_response['constraints_applied']}")
print(f"  Temporal filtering applied: {temporal_response['temporal_filtering_applied']}")
print(f"  Facts before filtering: {temporal_response['facts_before_filtering']}")
print(f"  Facts after filtering: {temporal_response['facts_after_filtering']}")
print(f"  Summary: {temporal_response['summary'][:100]}...")

# Multi-constraint query example
complex_response = client.query("Calculate revenue percentage increase from Q2 2010 to Q4 2015")
print(f"๐Ÿงฉ Multi-Constraint Query:")
print(f"  Constraint types: {list(complex_response['constraints'].keys())}")
print(f"  Temporal range: {complex_response['constraints'].get('temporal', [])}")
print(f"  Aggregation: {complex_response['constraints'].get('aggregation', [])}")

# NEW v0.6.0: Multi-turn conversations with context
client.start_conversation()

response1 = client.continue_conversation("What was Cadence's 2010 stock value?")
print(f"Turn 1: {response1['summary'][:100]}...")

response2 = client.continue_conversation("What about 2011?")  # Context maintained!
print(f"Turn 2: {response2['summary'][:100]}...")

response3 = client.continue_conversation("Calculate the percentage increase")
print(f"Turn 3: {response3['summary'][:100]}...")

client.end_conversation()
print(f"Session: {response3['session_id']}, Total turns: {response3['conversation_turn']}")

๐Ÿ“Š Performance & Validation (v0.7.0)

Production Performance

  • โšก Raw Fact Retrieval: 0.7-2s (96.3% faster than full analysis)
  • ๐Ÿง  Expert Analysis: 15-20s for comprehensive multi-hop reasoning
  • โฐ Constraint Extraction: ~200-500ms for LLM-based constraint identification (NEW v0.7.0)
  • ๐Ÿ“… Temporal Filtering: ~50-100ms for fact validity filtering (NEW v0.7.0)
  • ๐Ÿ’ฌ Conversation State: ~50ms session creation, ~100ms context retrieval
  • ๐Ÿ“Š Graph Retrieval: Now finding 36-50 facts (fixed from 0 facts)
  • ๐Ÿ”— Multi-hop Reasoning: 1-10 reasoning chains per complex query
  • ๐Ÿ“‹ Cross-document Patterns: 2+ patterns detected per expert analysis
  • ๐Ÿ’พ Storage Efficiency: 40-60% reduction through intelligent deduplication
  • ๐ŸŽฏ Expert Validation: 8.5/10 performance on professional M&A analysis
  • ๐Ÿ—๏ธ Infrastructure: 7 Lambda functions optimized (Python 3.12), sub-second API response

Benchmark Validation (September 2025)

VRIN v0.7.0 validated against industry-standard RAG benchmarks:

Benchmark v0.6.0 Accuracy v0.7.0 Expected Status
RGB (Noise Robustness) 97.9% โœ… 97.9% Core retrieval validated
FRAMES (Multi-hop) 28.6% 60%+ ๐ŸŽฏ Constraint solver improves multi-constraint queries
BEIR SciFact 22.2% 25%+ Scientific claim verification
RAGBench FinQA 11.1% 40%+ ๐ŸŽฏ Temporal + numerical constraint handling

Key Finding: v0.7.0 Multi-Hop Constraint Solver addresses the multi-constraint challenges identified in FRAMES and RAGBench FinQA. Temporal fact consistency enables accurate time-based queries.

v0.7.0 Constraint Solver Capabilities

  • โœ… Temporal Constraints: Year, quarter, month, date ranges, relative time
  • โœ… Numerical Constraints: Greater than, less than, between, specific values
  • โœ… Entity Constraints: Specific entities, properties, relationships
  • โœ… Comparison Constraints: A vs B, differences, changes over time
  • โœ… Aggregation Constraints: Total, average, sum, percentage changes
  • โœ… Multi-Constraint Queries: Handle 2-5 simultaneous constraints
  • โœ… Temporal Filtering: Facts valid at specific points in time
  • โœ… Conflict Resolution: Automatic fact supersession with version history

See: docs/BENCHMARK_TESTING_RESULTS.md for comprehensive analysis

๐Ÿ—๏ธ Hybrid Cloud Architecture

VRIN uses enterprise-grade Hybrid RAG with hybrid cloud architecture:

๐Ÿ”„ API Key Routing

  • vrin_ keys โ†’ VRIN shared infrastructure (cost-effective)
  • vrin_ent_ keys โ†’ Customer private infrastructure (data sovereignty)

๐Ÿ“Š Database Support

  • Neptune (AWS) - For general users and AWS enterprise deployments
  • CosmosDB (Azure) - For Azure enterprise deployments with Gremlin API
  • Automatic routing based on API key type and enterprise configuration

๐Ÿข Enterprise Portal

  • Organization and user management
  • API key provisioning and management
  • Infrastructure configuration (Azure/AWS)
  • Usage monitoring and analytics

๐Ÿ—๏ธ System Flow

  1. API Key Authentication - Routes to appropriate infrastructure
  2. User Specialization - Custom AI experts defined by users
  3. Enhanced Fact Extraction - Multi-cloud database storage
  4. Multi-hop Reasoning - Cross-document synthesis with reasoning chains
  5. Hybrid Retrieval - Graph traversal + vector similarity (36-50 facts)
  6. Expert Synthesis - Domain-specific analysis using custom prompts
  7. Production Infrastructure - 11 Lambda functions with hybrid routing
  8. Enterprise Security - Bearer token auth, user isolation, compliance

๐Ÿ” Authentication & Setup

General Users (Shared Infrastructure)

  1. Sign up at VRIN Console
  2. Get your vrin_ API key from account dashboard
  3. Use the API key to initialize your client
client = VRINClient(api_key="vrin_your_api_key_here")

Enterprise Users (Private Infrastructure)

  1. Contact VRIN Enterprise Sales for onboarding
  2. Deploy VRIN infrastructure in your Azure/AWS account
  3. Get your vrin_ent_ API key from enterprise portal
  4. Configure your infrastructure via enterprise portal
enterprise_client = VRINEnterpriseClient(api_key="vrin_ent_your_enterprise_key")

๐Ÿข Production Ready Features

๐Ÿ”„ Hybrid Cloud

  • Data Sovereignty: Enterprise data never leaves customer infrastructure
  • Multi-Cloud Support: AWS Neptune and Azure CosmosDB
  • Intelligent Routing: Automatic infrastructure routing by API key type
  • Enterprise Portal: Complete organization and user management

๐Ÿง  AI Capabilities

  • Custom AI Experts: Define domain-specific reasoning for any field
  • Multi-hop Analysis: Cross-document synthesis with evidence chains
  • Working Graph Facts: Fixed Neptune/CosmosDB storage now retrieving real relationships
  • Expert Validation: 8.5/10 performance against professional analysis

๐Ÿ—๏ธ Infrastructure

  • Production APIs: Bearer token auth, 99.5% uptime, enterprise ready
  • Smart Deduplication: 40-60% storage optimization with transparency
  • Hybrid Database: Seamless Neptune/CosmosDB routing
  • Enterprise Security: VPC isolation, private endpoints, compliance ready

๐ŸŽฏ Use Cases

  • Legal Analysis: M&A risk assessment, contract review, litigation strategy
  • Financial Research: Investment analysis, market research, due diligence
  • Technical Documentation: API analysis, architecture review, compliance
  • Strategic Planning: Competitive analysis, market intelligence, decision support

๐ŸŒŸ What Makes VRIN Different

vs. Basic RAG Systems

  • โœ… Multi-hop reasoning across knowledge graphs
  • โœ… User-defined specialization instead of rigid templates
  • โœ… Cross-document synthesis with pattern detection
  • โœ… Expert-level performance validated against professionals

vs. Enterprise AI Platforms

  • โœ… Complete customization - users define their own AI experts
  • โœ… Hybrid cloud architecture - customer choice of infrastructure
  • โœ… 100% data sovereignty - enterprise data never leaves customer infrastructure
  • โœ… Multi-cloud support - AWS and Azure with seamless routing
  • โœ… Enterprise portal - complete organization and user management
  • โœ… Production-ready infrastructure with full authentication
  • โœ… Temporal knowledge graphs with provenance and graceful fallback handling
  • โœ… Resilient connectivity - Neptune/CosmosDB fallback ensures service continuity
  • โœ… Open SDK with transparent operations and full API access

๐Ÿ“„ License

MIT License - see LICENSE file for details.


Built with โค๏ธ by the VRIN Team

Last updated: September 30, 2025 - Production v0.7.0 with Multi-Hop Constraint Solver, Temporal Fact Consistency, Conversation State & Hybrid Cloud Architecture

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vrin-0.8.1.tar.gz (78.0 kB view details)

Uploaded Source

File details

Details for the file vrin-0.8.1.tar.gz.

File metadata

  • Download URL: vrin-0.8.1.tar.gz
  • Upload date:
  • Size: 78.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vrin-0.8.1.tar.gz
Algorithm Hash digest
SHA256 d5df420860ce66870ac19833614e1f58bbeefd8c131536f1425e7f2d126b70a9
MD5 83b4ad85a92d73e213dfc04ca1f4cde0
BLAKE2b-256 8db0492b71db1de898b26347231fef3f9cc0dd94554d3e9bb767cb81c4dadcdb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page