Dev.

Configuration Reference

Every key of config/oi-laravel-raggable.php with its environment variable

Configuration Reference

Publish the file to customize it:

bash
php artisan vendor:publish --tag=oi-laravel-raggable-config

Storage

KeyEnvDefaultDescription
driverRAGGABLE_DRIVERdatabasedatabase (portable JSON + in-PHP cosine, any DB) or pgvector (native Postgres vectors + HNSW).
dimensionsRAGGABLE_DIMENSIONS1024Vector size — must equal the embedding model output, and be set before migrating.

Indexing

KeyEnvDefaultDescription
auto_refreshRAGGABLE_AUTO_REFRESHtrueRe-embed automatically when embeddable attributes change.
queueRAGGABLE_QUEUEdefaultQueue the GenerateEmbeddingJob runs on.
embedder—LaravelAiEmbedder::classThe Embedder implementation used to produce vectors.
embedding.providerRAGGABLE_EMBEDDING_PROVIDERnullProvider passed to the embedder; null uses the SDK default.
embedding.modelRAGGABLE_EMBEDDING_MODELnullModel passed to the embedder; null uses the SDK default.

Integrations

KeyEnvDefaultDescription
setting_storeRAGGABLE_SETTING_STOREnullSettingStore class for runtime-tunable values; null auto-detects the oi-laravel-settings adapter.
context_binding—nullContainer binding resolving the scope (e.g. current team) settings are read/written under.
track_usageRAGGABLE_TRACK_USAGEtrueRecord each embedding request through oi-laravel-ai.
settings——Declares the label + type for each runtime-tunable key (similarity.max_distance, similarity.limit, auto_refresh, embedding.provider, embedding.model).

See Ecosystem integrations for how the setting store and usage tracking work.

Similarity

KeyEnvDefaultDescription
similarity.max_distanceRAGGABLE_MAX_DISTANCE0.5Cosine distance cutoff above which results are dropped (0 = identical, 1 = orthogonal).
similarity.limitRAGGABLE_LIMIT20Default result limit.

Chunking

Long content is split into overlapping chunks before embedding. Token counts are estimated locally (~ characters / chars_per_token).

KeyEnvDefault
chunk.max_tokensRAGGABLE_CHUNK_MAX_TOKENS1000
chunk.overlap_tokensRAGGABLE_CHUNK_OVERLAP_TOKENS120
chunk.hard_limit_tokensRAGGABLE_CHUNK_HARD_LIMIT_TOKENS6000
chunk.chars_per_tokenRAGGABLE_CHUNK_CHARS_PER_TOKEN3.5
chunk.max_inputs_per_requestRAGGABLE_MAX_INPUTS_PER_REQUEST128
chunk.request_token_budgetRAGGABLE_REQUEST_TOKEN_BUDGET16000

Overridable classes

KeyDefaultDescription
models.embeddingEmbedding::classDocument-header model.
models.chunkChunk::classChunk model.
stores.databaseDatabaseVectorStore::classStore for the database driver.
stores.pgvectorPgvectorStore::classStore for the pgvector driver.
user_modelApp\Models\UserHost user model.

Registry

KeyDescription
embeddablesMaps a short key to each embeddable model class, used by raggable:embed. Example: ['documents' => \App\Models\Document::class].

Calibration

After the first real backfill, run a few representative queries and inspect the similarity_distance of the results. Set RAGGABLE_MAX_DISTANCE just below the point where relevance drops off — too high returns noise, too low hides good matches.

Project under MIT License.
Design by