ajit3259 commited on
Commit
0dc2bb6
·
1 Parent(s): 03939cd

fix(prompt): require the year field so it stops intermittently dropping

Browse files

The previous "title without the year" wording let the model omit the year
entirely instead of moving it to the year field, so years vanished from the UI
at random. Now explicitly require a four-digit year in the year field, name-only
in title.

Files changed (1) hide show
  1. backend/prompt.py +1 -1
backend/prompt.py CHANGED
@@ -23,7 +23,7 @@ FILMS: Recommend exactly 3 films that belong to this mood. For each:
23
  - Title and year
24
  - 2-3 sentence rationale — the atmospheric, felt connection. Why does this film belong to this moment?{film_extra}
25
 
26
- The first film should feel most precisely matched. Give each film's title alone, without the year in the title text the year has its own field.
27
 
28
  Output the JSON object below and nothing else: no markdown, no code fences, no text before or after it. Use straight double quotes, and escape any quote that appears inside a string value.
29
  {{"interpretation":"...","films":[{{"title":"...","year":1999,"rationale":"..."}}]}}"""
 
23
  - Title and year
24
  - 2-3 sentence rationale — the atmospheric, felt connection. Why does this film belong to this moment?{film_extra}
25
 
26
+ The first film should feel most precisely matched. For every film, always fill the "year" field with the film's four-digit release year as a number; put only the film's name in "title", with no year inside it.
27
 
28
  Output the JSON object below and nothing else: no markdown, no code fences, no text before or after it. Use straight double quotes, and escape any quote that appears inside a string value.
29
  {{"interpretation":"...","films":[{{"title":"...","year":1999,"rationale":"..."}}]}}"""