venmail/laravel-semantic-search
Natural language semantic search for Laravel Eloquent models: query in plain English, no embeddings or training. Auto-analyzes your codebase, navigates relationships, supports aggregations, multilingual input, and multi-database setups.
Architecture fit. The package fits the Laravel idiom cleanly: a service provider, a publishable config/semantic-search.php, a facade (SemanticSearch::search()), and Eloquent-backed execution. The architectural bet is the interesting part — it replaces embedding/vector-search infrastructure with static code analysis plus a heuristic English-to-SQL parser. For a TPM, that is a meaningful operational simplification (no vector DB, no embedding pipeline, no model hosting, no GPU spend), but it shifts complexity into the parser. The ceiling of a heuristic parser is bounded by the grammar it recognizes; the README's headline examples ("active users who made purchases over $500 in the last 30 days") are precisely the class of multi-clause queries heuristics handle least reliably. The optional LLM fallback is the escape hatch, but enabling it reintroduces an external dependency and a latency/cost profile the static path was meant to avoid. In other words: the package's value proposition is strongest for simple NL queries and weakest for the complex ones it advertises.
Integration feasibility. Low friction on paper. composer require, publish config, flip an env flag for LLM. Auto-discovery of models, controllers, views, and routes means near-zero wiring. The risk is that auto-discovery is a filesystem scan — that has implications for read-only container filesystems, autoscaled ephemeral instances, and cache invalidation when code changes but the analysis cache does not.
Technical risk: high. The observable maturity signals do not support the README's "production-ready" claim. One star, zero dependents, version 0.3.0 that already shipped a breaking change (SearchEngine → EnhancedSemanticSearchService, QueryParser removed), no visible CI/coverage badges, no security policy, no commercial support, and a test count referenced only in changelog prose ("26/26 tests passing"). The gap between marketing language and observable evidence is itself a risk signal — it suggests the docs are aspirational. You would not be an early adopter; you would be the first production user.
Key questions to resolve before any commitment.
wherePolicies, and tenant scoping, or does it bypass them? This is a blocker if the answer is unclear.restricted_models, restricted_fields) — blocklists fail open for any new model or column. Is there an allowlist mode?Stack fit. Laravel 9–11 / PHP 8.1+ / MySQL 8, Postgres 12, SQLite covers the common enterprise baseline. Watch for Laravel 12 — no stated support yet, and with zero dependents there is no ecosystem pressure to keep pace.
Migration path. Effectively none — this is greenfield adoption, not a replacement for an existing search layer. Treat every 0.x upgrade as a mini-migration given the demonstrated willingness to break public classes.
Compatibility discipline. Pin to an exact version in composer.json, not a caret range. Because there are no dependents de-risking the package for you, you are absorbing all compatibility risk; pinning is the only control you have.
Sequencing (the TPM recommendation).
Venmail\SemanticSearch\Facades\SemanticSearch leak into controllers and services.Maintenance. Realistically, you become the de facto maintainer. The static analyzer is coupled to your code's shape — moving models, renaming columns, introducing traits or polymorphic relations can silently degrade parse quality. Budget for a regression suite of NL queries in CI (the corpus from step 2) so refactors fail loudly rather than degrading quietly. Expect to vendor-patch or fork within a year.
Support. GitHub issues only, no SLA, one star, no commercial backing, no community. For any customer-facing surface this is a genuine support risk; for internal tooling it is tolerable if you own the runbook.
Scaling. Static analysis is cached, which is good, but query translation is CPU work per request, and the LLM fallback adds an external hop with a 10-second configured timeout — that is a long tail for a synchronous request path. The LLM path also needs rate-limit/backoff handling that isn't clearly documented, and per-token cost scales with query volume. max_rows: 10000 is a safety valve but also a functional ceiling.
Failure modes to design for.
Ramp-up. Low for consumers (a clean facade), higher for operators. On-call needs a runbook covering: how to read parser confidence, how to disable LLM fallback at runtime, how to clear the cache safely, and how to reproduce "why did this query return wrong results." Without that runbook, every misparse becomes an escalation.
Bottom line for a TPM. The concept is genuinely attractive — natural-language querying without an ML platform is a real operational win — but the execution evidence does not yet justify production adoption. Recommend a time-boxed spike against a real query corpus, wrapped in an adapter, deployed only to a non-critical surface if it passes. Do not put this on a customer-facing or financial path until it has a release history, CI evidence, and clarity on tenancy and authorization. Opportunity score of ~31 reflects exactly this: interesting whitespace, unproven artifact.
How can I help you explore Laravel packages today?