Commit bdd5f04
fix: extraction model + prompt tuning + seed format (#169)
* fix: switch extraction to gate model and tighten prompt to reduce junk memories
Extraction was using gpt-5.2 via generateText() instead of gpt-4.1-nano.
The smart model was extracting memories from casual one-off questions (e.g.
"what happened to chuck norris"). Now uses GATE_MODEL directly like selection
does. Also strengthened the extraction prompt — NONE is the default, asking
a question is not energy, added concrete NONE examples. Seed SQL reformatted
to match runtime extraction style.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: remove seed SQL from repo
Steve will run it separately — doesn't belong in the codebase.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* refactor: add optional model param to generateText instead of accessing openai client directly
Per Steve's review — extraction and selection now use generateText()
with an optional model override instead of reaching into
openAiService.openai. Web search tools are skipped when using a
custom model (gate model doesn't need them).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 03c2ec4 commit bdd5f04
File tree
4 files changed
+20
-280
lines changed- packages/backend/src
- ai
- openai
- memory
4 files changed
+20
-280
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
| |||
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| 120 | + | |
118 | 121 | | |
119 | 122 | | |
120 | 123 | | |
| |||
127 | 130 | | |
128 | 131 | | |
129 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
130 | 143 | | |
131 | 144 | | |
132 | 145 | | |
133 | 146 | | |
134 | 147 | | |
135 | | - | |
| 148 | + | |
136 | 149 | | |
137 | 150 | | |
138 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 28 | | |
33 | 29 | | |
34 | 30 | | |
| |||
348 | 344 | | |
349 | 345 | | |
350 | 346 | | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | | - | |
362 | | - | |
| 347 | + | |
363 | 348 | | |
364 | 349 | | |
365 | 350 | | |
| |||
467 | 452 | | |
468 | 453 | | |
469 | 454 | | |
470 | | - | |
| 455 | + | |
471 | 456 | | |
472 | 457 | | |
473 | | - | |
| 458 | + | |
474 | 459 | | |
475 | 460 | | |
476 | 461 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments