ragify_flutter 0.0.6
ragify_flutter: ^0.0.6 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 provides intelligent context management. Built specifically for LLM-powered Flutter applications that need to retrieve and manage contextual information from various data sources.
π― Why RAGify Flutter? #
Building AI-powered Flutter apps is challenging because:
- Multiple data sources need to be combined intelligently
- Context management requires efficient data retrieval and processing
- Cross-platform compatibility needs to work on all Flutter platforms
- Performance must be optimized for mobile and web
- Easy integration with existing Flutter applications
RAGify Flutter provides a unified framework for context management and data source integration.
π What You Get #
Core Capabilities #
- Multi-Source Data Integration - Connect to documents, APIs, databases, and real-time sources
- Context Management - Organize and retrieve contextual information efficiently
- Privacy Management - Configurable privacy levels for different data sources
- Concurrent Processing - Process multiple sources simultaneously for better performance
- Relevance Scoring - Basic relevance assessment for context chunks
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.5
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 a comprehensive example application:
- Basic Usage - Complete example with all data source types (API, Document, Database)
- Database Testing - SQLite, PostgreSQL, MySQL, and MongoDB integration examples
- Real-time Features - WebSocket and real-time data source examples
Run the example:
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
π Privacy & Security #
- Privacy Levels: Configurable privacy levels for different data sources
- Basic Encryption: Support for data encryption (implementation in progress)
- Access Control: Basic access control mechanisms
- Logging: Comprehensive logging for debugging and monitoring
- Data Protection: Basic data protection features
π Performance #
- Response Time: Optimized for reasonable query response times
- Concurrent Processing: Async processing for better performance
- Memory Efficient: Basic caching and chunking mechanisms
- Cross-Platform: Works across all Flutter platforms
π Data Sources #
- Documents: PDF, DOCX, TXT, HTML, CSV, JSON, YAML, XML, INI, DOC
- APIs: REST APIs with GET/POST support and query inclusion
- Databases: SQLite, PostgreSQL, MySQL, MongoDB
- Real-time: WebSocket support (basic implementation)
π€ Contributing #
We welcome contributions! This is an active project with ongoing development.
# 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