Download the PHP package akira/laravel-rag without Composer
On this page you can find all versions of the php package akira/laravel-rag. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download akira/laravel-rag
More information about akira/laravel-rag
Files in akira/laravel-rag
Package laravel-rag
Short Description Akira RAG for Laravel 12 with PostgreSQL + pgvector
License MIT
Homepage https://github.com/akira-rag/laravel-rag
Informations about the package laravel-rag
Akira RAG for Laravel
A production-ready Retrieval-Augmented Generation (RAG) system for Laravel 12+ with PostgreSQL + pgvector. Built with clean architecture, type safety, and deterministic behavior.
Features
- Clean Architecture - Facade → Service → Manager pattern
- Type Safety - Full type hints and custom exceptions
- Multi-tenant Support - Optional tenant isolation with custom resolvers
- Performance - HNSW indexing, caching, and optimized queries
- Idempotent Ingestion - Hash-based deduplication
- Audit Logging - Built-in query tracking
- Deterministic Chunking - Configurable token-based splitting
- ️ CLI Tools - Rich interactive commands for management
Requirements
- PHP: 8.4+
- Laravel: 12+
- Database: PostgreSQL 14+ (with pgvector extension)
- Optional: SQLite for testing (in-memory)
Installation
Quick Install (Recommended)
The installer will guide you through:
- Publishing configuration files
- Publishing migrations
- Running migrations
- Enabling multi-tenant mode (optional)
Non-Interactive Install
Perfect for CI/CD pipelines:
Manual Install
PostgreSQL Setup
Ensure pgvector extension is available:
Quick Start
Basic Usage
Advanced Usage
Using Data Transfer Objects
CLI Commands
Interactive Commands
All commands support rich interactive prompts:
Non-Interactive Mode
Perfect for automation:
Configuration
The config/rag.php file provides extensive configuration options:
Multi-Tenancy
Setup
-
Enable tenancy in config:
- Create a tenant resolver:
Usage
Once configured, all operations are automatically scoped to the current tenant:
Exception Handling
The package provides specific exceptions for different scenarios:
Available Exceptions
- Validation:
InvalidPayload,InvalidQuestionException - Resources:
DocumentNotFoundException,ChunkNotFoundException - Processing:
ChunkingException,EmbeddingException,RetrievalException - Import/Export:
ExportException,ImportException - Infrastructure:
CacheException,DatabaseException,ConfigurationException - Tenancy:
TenantResolverException
See Exception Documentation for complete details.
Testing
Writing Tests
Architecture
Documentation
For detailed documentation, visit:
- Full Documentation
- Configuration Guide
- Multi-tenancy Setup
- Ingestion Guide
- Asking Queries
- Recipes & Examples
Changelog
Please see CHANGELOG for recent changes.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security vulnerabilities, please review our security policy.
Credits
- kid
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-rag with dependencies
illuminate/contracts Version ^12.0
spatie/laravel-package-tools Version ^1.16
spatie/laravel-data Version ^4.6
ext-zlib Version *