Skip to content

Commit b2baf5a

Browse files
Release v1.0.4 (#224)
Strip -dev from composer.json version and stamp the CHANGELOG [Unreleased] section as [1.0.4] - 2026-06-26.
1 parent 75761be commit b2baf5a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All notable changes to scolta-php will be documented in this file.
44

55
This project uses [Semantic Versioning](https://semver.org/). Major versions are synchronized across all Scolta packages; minor and patch versions are released independently per package.
66

7-
## [Unreleased]
7+
## [1.0.4] - 2026-06-26
88

99
### Fixed
1010
- **AI sort-intent no longer fires on a hard sort word buried in a conversational/descriptive query (`src/Http/AiEndpointHandler.php`, `appendSortableFieldsInstruction()`).** Regression (terra-collecta, 2026-06-17): the query *"I am looking for a gift for my friend who likes the cheapest handmade items"* returned `sort_hint: {field: "price", direction: "asc"}` — but "cheapest" there describes the items the friend likes, not a request to order results by price; the user wants gift ideas, not a price-sorted list. The `SORT INTENT` prompt block already carried the buried-phrase/unsorted-list litmus guidance, but its only negative gift example used the **soft** qualifier "affordable", so the model let STEP 4's hard-word mapping (`cheapest` → price asc) override the conversational frame. The prompt now adds an explicit **hard-word** buried negative example (the exact failing gift query) plus two STEP 3 descriptive-frame bullets, and states that a hard sort word (`cheapest`, `most expensive`, `newest`, `oldest`, `longest`, …) embedded in a conversational/descriptive frame is STILL NOT primary sort intent — the framing **overrides** the STEP 4 word→field mapping. STEP 4 fires only when ordering results is the query's whole point. This is an **LLM-adherence** fix: it tightens the prompt without changing the parser. The prompt-construction tests assert the new guidance strings are present; a committed `tests/fixtures/sort-intent-eval.json` battery tracks the failing query, 3 buried-conversational variants (`expectSort: null`), and the true-positive controls (`most expensive stone`→price desc, `cheapest crystals`→price asc, bare `cheapest`→price asc, `pierres les moins chères`→price asc, `newest posts`/`latest news`→date desc, `oldest articles`→date asc) — final verification is the browser regression re-run against the live model, since CI cannot drive the LLM deterministically.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tag1/scolta-php",
3-
"version": "1.0.4-dev",
3+
"version": "1.0.4",
44
"description": "AI-powered search with Pagefind \u2014 PHP language binding",
55
"type": "library",
66
"license": "MIT",

0 commit comments

Comments
 (0)