ragify_flutter 0.0.4
ragify_flutter: ^0.0.4 copied to clipboard
Intelligent Context Orchestration Framework for Flutter - Smart Context for LLM-Powered Applications
π RAGify Flutter #
Intelligent Context Orchestration Framework for Flutter - Smart Context for LLM-Powered Applications
A Flutter package that combines data from multiple sources (documents, APIs, databases, real-time) and resolves conflicts intelligently. Built specifically for LLM-powered Flutter applications that need accurate, current information.
π― Why RAGify Flutter? #
Building AI-powered Flutter apps is challenging because:
- Multiple data sources need to be combined intelligently
- Conflicting information between sources must be resolved
- Real-time updates require efficient context management
- Privacy and security need to be built-in, not bolted-on
- Performance must be optimized for mobile and web
RAGify Flutter solves these problems with a unified, production-ready framework.
π What You Get #
Core Capabilities #
- Multi-Source Context Fusion - Combine data from documents, APIs, databases, and real-time sources
- Intelligent Conflict Resolution - Detect and resolve contradictions using source authority and freshness
- Privacy Management - 4-tier privacy levels (Public, Private, Enterprise, Restricted)
- Concurrent Processing - Process multiple sources simultaneously for better performance
- Relevance Scoring - Multi-factor assessment of context relevance
Flutter-Specific Features #
- Cross-Platform Support - Works on iOS, Android, Web, and Desktop
- Async/Await Support - Full async support for non-blocking operations
- State Management Integration - Works with Provider, Bloc, Riverpod, and other state management solutions
- Performance Optimized - Efficient memory usage and processing
π Quick Start #
1. Add Dependency #
dependencies:
ragify_flutter: ^0.0.4
2. Import Package #
import 'package:ragify_flutter/ragify_flutter.dart';
3. Basic Usage #
// Create RAGify instance
final ragify = RAGify();
// Initialize
await ragify.initialize();
// Add data sources
ragify.addDataSource(DocumentSource(
name: 'docs',
documentPath: './documents',
));
// Get context
final context = await ragify.getContext(
query: 'What are the latest features?',
maxChunks: 10,
minRelevance: 0.7,
);
// Use the context
for (final chunk in context.chunks) {
print('${chunk.content} (Score: ${chunk.relevanceScore?.score})');
}
ποΈ Architecture #
Core Components #
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Flutter Application β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β RAGify Flutter β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β Fusion β β Scoring β β Storage β β Updates β β
β β Engine β β Engine β β Engine β β Engine β β
β β (Conflicts) β β (Relevance) β β (Save) β β (Live) β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β Vector β β Cache β β Privacy β β Monitor β β
β β DB β β Manager β β Manager β β Engine β β
β β(Local/Cloud)β β(Memory/Redis)β β (Encrypt) β β(Performance)β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β Data Sources β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β Documents β β APIs β β Databases β β Real-time β β
β β (PDF, DOCX, β β (REST, β β (SQL, β β Data β β
β β TXT, MD) β β GraphQL) β β NoSQL) β β(WebSocket, β β
β β β β β β β β MQTT, Kafka)β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ βββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π± Examples #
The package includes complete example applications:
- Basic Usage - Simple context retrieval
- Advanced Features - Complex integration patterns
- Full Integration - Complete application examples
Run examples:
cd example/basic_usage
flutter run
π§ Configuration #
final config = RagifyConfig(
privacyLevel: PrivacyLevel.enterprise,
maxContextSize: 50000,
defaultRelevanceThreshold: 0.7,
enableCaching: true,
cacheTtl: 7200,
conflictDetectionThreshold: 0.8,
sourceTimeout: 60.0,
maxConcurrentSources: 20,
);
final ragify = RAGify(config: config);
π§ͺ Testing #
# Run all tests
flutter test
# Run with coverage
flutter test --coverage
# Current coverage: 40.92%
π Privacy & Security #
- 4 Privacy Levels: Public, Private, Enterprise, Restricted
- Encryption: AES-256, RSA-2048, ChaCha20 support
- Access Control: Role-based permissions (Guest to Superuser)
- Audit Logging: Complete operation tracking
- Compliance: GDPR, HIPAA, SOX ready
π Performance #
- Response Time: Optimized for <200ms typical queries
- Concurrent Processing: Multi-isolate parallel processing
- Memory Efficient: Intelligent caching and chunking
- Cross-Platform: Platform-specific optimizations
π Data Sources #
- Documents: PDF, DOCX, TXT, Markdown
- APIs: REST, GraphQL with rate limiting
- Databases: PostgreSQL, MySQL, MongoDB, SQLite
- Real-time: WebSocket, MQTT, Redis, Kafka
π€ Contributing #
We welcome contributions! See Contributing Guide for details.
# Development setup
git clone https://github.com/sumitnemade/ragify_flutter.git
cd ragify_flutter
flutter pub get
flutter test
π License #
BSD 3-Clause License - see LICENSE file for details.
π Related Projects #
- Python Version: RAGify Python - The original
π Support #
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Built with β€οΈ for the Flutter community