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