@lobehub/lobehub 2.0.0-next.360 → 2.0.0-next.361

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/changelog/v1.json +5 -0
  3. package/package.json +1 -1
  4. package/packages/const/src/userMemory.ts +1 -0
  5. package/packages/database/src/models/userMemory/model.ts +178 -3
  6. package/packages/database/src/models/userMemory/sources/benchmarkLoCoMo.ts +1 -1
  7. package/packages/memory-user-memory/package.json +2 -1
  8. package/packages/memory-user-memory/promptfoo/evals/activity/basic/buildMessages.ts +40 -0
  9. package/packages/memory-user-memory/promptfoo/evals/activity/basic/eval.yaml +13 -0
  10. package/packages/memory-user-memory/promptfoo/evals/activity/basic/prompt.ts +5 -0
  11. package/packages/memory-user-memory/promptfoo/evals/activity/basic/tests/cases.ts +106 -0
  12. package/packages/memory-user-memory/promptfoo/evals/activity/locomo/buildMessages.ts +104 -0
  13. package/packages/memory-user-memory/promptfoo/evals/activity/locomo/eval.yaml +13 -0
  14. package/packages/memory-user-memory/promptfoo/evals/activity/locomo/prompt.ts +5 -0
  15. package/packages/memory-user-memory/promptfoo/evals/activity/locomo/tests/benchmark-locomo-payload-conv-26.json +149 -0
  16. package/packages/memory-user-memory/promptfoo/evals/activity/locomo/tests/cases.ts +72 -0
  17. package/packages/memory-user-memory/promptfoo/response-formats/activity.json +370 -0
  18. package/packages/memory-user-memory/promptfoo/response-formats/experience.json +14 -0
  19. package/packages/memory-user-memory/promptfoo/response-formats/identity.json +281 -255
  20. package/packages/memory-user-memory/promptfooconfig.yaml +1 -0
  21. package/packages/memory-user-memory/scripts/generate-response-formats.ts +26 -2
  22. package/packages/memory-user-memory/src/extractors/activity.ts +44 -0
  23. package/packages/memory-user-memory/src/extractors/gatekeeper.test.ts +2 -1
  24. package/packages/memory-user-memory/src/extractors/gatekeeper.ts +2 -1
  25. package/packages/memory-user-memory/src/extractors/index.ts +1 -0
  26. package/packages/memory-user-memory/src/prompts/gatekeeper.ts +3 -3
  27. package/packages/memory-user-memory/src/prompts/index.ts +7 -1
  28. package/packages/memory-user-memory/src/prompts/layers/activity.ts +90 -0
  29. package/packages/memory-user-memory/src/prompts/layers/index.ts +1 -0
  30. package/packages/memory-user-memory/src/providers/existingUserMemory.test.ts +25 -1
  31. package/packages/memory-user-memory/src/providers/existingUserMemory.ts +113 -0
  32. package/packages/memory-user-memory/src/schemas/activity.ts +315 -0
  33. package/packages/memory-user-memory/src/schemas/experience.ts +5 -5
  34. package/packages/memory-user-memory/src/schemas/gatekeeper.ts +1 -0
  35. package/packages/memory-user-memory/src/schemas/index.ts +1 -0
  36. package/packages/memory-user-memory/src/services/extractExecutor.ts +29 -0
  37. package/packages/memory-user-memory/src/types.ts +7 -0
  38. package/packages/types/src/serverConfig.ts +1 -1
  39. package/packages/types/src/userMemory/layers.ts +52 -0
  40. package/packages/types/src/userMemory/list.ts +20 -2
  41. package/packages/types/src/userMemory/shared.ts +22 -1
  42. package/packages/types/src/userMemory/trace.ts +1 -0
  43. package/packages/types/src/util.ts +9 -1
  44. package/src/libs/next/proxy/define-config.ts +1 -0
  45. package/src/server/globalConfig/parseMemoryExtractionConfig.ts +7 -1
  46. package/src/server/services/memory/userMemory/__tests__/extract.runtime.test.ts +2 -0
  47. package/src/server/services/memory/userMemory/extract.ts +108 -7
@@ -0,0 +1,149 @@
1
+ {
2
+ "force": true,
3
+ "layers": [],
4
+ "sampleId": "conv-26",
5
+ "sessions": [
6
+ {
7
+ "sessionId": "session_1",
8
+ "timestamp": "2023-05-08T13:56:00.000Z",
9
+ "turns": [
10
+ {
11
+ "createdAt": "2023-05-08T13:56:00.000Z",
12
+ "diaId": "D1:1",
13
+ "role": "user",
14
+ "speaker": "Caroline",
15
+ "text": "Hey Mel! Good to see you! How have you been?"
16
+ },
17
+ {
18
+ "createdAt": "2023-05-08T13:56:00.000Z",
19
+ "diaId": "D1:2",
20
+ "role": "assistant",
21
+ "speaker": "Melanie",
22
+ "text": "Hey Caroline! Good to see you! I'm swamped with the kids & work. What's up with you? Anything new?"
23
+ },
24
+ {
25
+ "createdAt": "2023-05-08T13:56:00.000Z",
26
+ "diaId": "D1:3",
27
+ "role": "user",
28
+ "speaker": "Caroline",
29
+ "text": "I went to a LGBTQ support group yesterday and it was so powerful."
30
+ },
31
+ {
32
+ "createdAt": "2023-05-08T13:56:00.000Z",
33
+ "diaId": "D1:4",
34
+ "role": "assistant",
35
+ "speaker": "Melanie",
36
+ "text": "Wow, that's cool, Caroline! What happened that was so awesome? Did you hear any inspiring stories?"
37
+ },
38
+ {
39
+ "createdAt": "2023-05-08T13:56:00.000Z",
40
+ "diaId": "D1:5",
41
+ "imageCaption": "a photo of a dog walking past a wall with a painting of a woman",
42
+ "imageUrls": [
43
+ "https://i.redd.it/l7hozpetnhlb1.jpg"
44
+ ],
45
+ "role": "user",
46
+ "speaker": "Caroline",
47
+ "text": "The transgender stories were so inspiring! I was so happy and thankful for all the support.\n[Image: a photo of a dog walking past a wall with a painting of a woman]"
48
+ },
49
+ {
50
+ "createdAt": "2023-05-08T13:56:00.000Z",
51
+ "diaId": "D1:6",
52
+ "role": "assistant",
53
+ "speaker": "Melanie",
54
+ "text": "Wow, love that painting! So cool you found such a helpful group. What's it done for you?"
55
+ },
56
+ {
57
+ "createdAt": "2023-05-08T13:56:00.000Z",
58
+ "diaId": "D1:7",
59
+ "role": "user",
60
+ "speaker": "Caroline",
61
+ "text": "The support group has made me feel accepted and given me courage to embrace myself."
62
+ },
63
+ {
64
+ "createdAt": "2023-05-08T13:56:00.000Z",
65
+ "diaId": "D1:8",
66
+ "role": "assistant",
67
+ "speaker": "Melanie",
68
+ "text": "That's really cool. You've got guts. What now?"
69
+ },
70
+ {
71
+ "createdAt": "2023-05-08T13:56:00.000Z",
72
+ "diaId": "D1:9",
73
+ "role": "user",
74
+ "speaker": "Caroline",
75
+ "text": "Gonna continue my edu and check out career options, which is pretty exciting!"
76
+ },
77
+ {
78
+ "createdAt": "2023-05-08T13:56:00.000Z",
79
+ "diaId": "D1:10",
80
+ "role": "assistant",
81
+ "speaker": "Melanie",
82
+ "text": "Wow, Caroline! What kinda jobs are you thinkin' of? Anything that stands out?"
83
+ },
84
+ {
85
+ "createdAt": "2023-05-08T13:56:00.000Z",
86
+ "diaId": "D1:11",
87
+ "role": "user",
88
+ "speaker": "Caroline",
89
+ "text": "I'm keen on counseling or working in mental health - I'd love to support those with similar issues."
90
+ },
91
+ {
92
+ "createdAt": "2023-05-08T13:56:00.000Z",
93
+ "diaId": "D1:12",
94
+ "imageCaption": "a photo of a painting of a sunset over a lake",
95
+ "imageUrls": [
96
+ "http://candicealexander.com/cdn/shop/products/IMG_7269_a49d5af8-c76c-4ecd-ae20-48c08cb11dec.jpg"
97
+ ],
98
+ "role": "assistant",
99
+ "speaker": "Melanie",
100
+ "text": "You'd be a great counselor! Your empathy and understanding will really help the people you work with. By the way, take a look at this.\n[Image: a photo of a painting of a sunset over a lake]"
101
+ },
102
+ {
103
+ "createdAt": "2023-05-08T13:56:00.000Z",
104
+ "diaId": "D1:13",
105
+ "role": "user",
106
+ "speaker": "Caroline",
107
+ "text": "Thanks, Melanie! That's really sweet. Is this your own painting?"
108
+ },
109
+ {
110
+ "createdAt": "2023-05-08T13:56:00.000Z",
111
+ "diaId": "D1:14",
112
+ "role": "assistant",
113
+ "speaker": "Melanie",
114
+ "text": "Yeah, I painted that lake sunrise last year! It's special to me."
115
+ },
116
+ {
117
+ "createdAt": "2023-05-08T13:56:00.000Z",
118
+ "diaId": "D1:15",
119
+ "role": "user",
120
+ "speaker": "Caroline",
121
+ "text": "Wow, Melanie! The colors really blend nicely. Painting looks like a great outlet for expressing yourself."
122
+ },
123
+ {
124
+ "createdAt": "2023-05-08T13:56:00.000Z",
125
+ "diaId": "D1:16",
126
+ "role": "assistant",
127
+ "speaker": "Melanie",
128
+ "text": "Thanks, Caroline! Painting's a fun way to express my feelings and get creative. It's a great way to relax after a long day."
129
+ },
130
+ {
131
+ "createdAt": "2023-05-08T13:56:00.000Z",
132
+ "diaId": "D1:17",
133
+ "role": "user",
134
+ "speaker": "Caroline",
135
+ "text": "Totally agree, Mel. Relaxing and expressing ourselves is key. Well, I'm off to go do some research."
136
+ },
137
+ {
138
+ "createdAt": "2023-05-08T13:56:00.000Z",
139
+ "diaId": "D1:18",
140
+ "role": "assistant",
141
+ "speaker": "Melanie",
142
+ "text": "Yep, Caroline. Taking care of ourselves is vital. I'm off to go swimming with the kids. Talk to you soon!"
143
+ }
144
+ ]
145
+ }
146
+ ],
147
+ "source": "benchmark_locomo",
148
+ "topicId": "sample_conv-26"
149
+ }
@@ -0,0 +1,72 @@
1
+ type PromptfooAssert =
2
+ | { type: 'javascript'; value: string }
3
+ | { provider?: string; type: 'llm-rubric'; value: string };
4
+
5
+ interface PromptfooTestCase {
6
+ assert: PromptfooAssert[];
7
+ description?: string;
8
+ vars: Record<string, unknown>;
9
+ }
10
+
11
+ const baseSchemaAssert: PromptfooAssert = {
12
+ type: 'javascript',
13
+ value: `
14
+ let parsed;
15
+ try {
16
+ parsed = JSON.parse(output);
17
+ } catch (error) {
18
+ console.error('Failed to parse JSON output', error);
19
+ return false;
20
+ }
21
+
22
+ if (!parsed || !Array.isArray(parsed.memories)) return false;
23
+
24
+ return parsed.memories.every((memory) => {
25
+ return memory.memoryType === 'activity' && memory.withActivity?.type;
26
+ });
27
+ `,
28
+ };
29
+
30
+ const testCases: PromptfooTestCase[] = [
31
+ {
32
+ assert: [
33
+ baseSchemaAssert,
34
+ {
35
+ type: 'javascript',
36
+ value: `
37
+ const data = JSON.parse(output);
38
+ const target = data.memories?.find((memory) => {
39
+ const text = [memory.title, memory.summary, memory.withActivity?.narrative]
40
+ .filter(Boolean)
41
+ .join(' ')
42
+ .toLowerCase();
43
+ return text.includes('support group');
44
+ });
45
+
46
+ if (!target) return false;
47
+ const startsAt = target.withActivity?.startsAt;
48
+ if (!startsAt) return false;
49
+
50
+ return String(startsAt).startsWith('2023-05-07');
51
+ `,
52
+ },
53
+ {
54
+ provider: 'openai:gpt-5-mini',
55
+ type: 'llm-rubric',
56
+ value:
57
+ 'Should extract the LGBTQ support group activity from session_1 diaId D1:3, convert "yesterday" relative to the 2023-05-08 session anchor into 2023-05-07, and include a narrative about feeling supported/accepted.',
58
+ },
59
+ ],
60
+ description: 'LoCoMo conv-26 session_1 resolves relative date',
61
+ vars: {
62
+ availableCategories: ['personal'],
63
+ language: 'English',
64
+ payloadPath: './promptfoo/evals/activity/locomo/tests/benchmark-locomo-payload-conv-26.json',
65
+ sessionId: 'session_1',
66
+ topK: 3,
67
+ username: 'Caroline',
68
+ },
69
+ },
70
+ ];
71
+
72
+ export default testCases;
@@ -0,0 +1,370 @@
1
+ {
2
+ "json_schema": {
3
+ "name": "activity_extraction",
4
+ "schema": {
5
+ "additionalProperties": false,
6
+ "properties": {
7
+ "memories": {
8
+ "description": "Array of extracted activity memories. Use an empty array when no activity should be captured.",
9
+ "items": {
10
+ "additionalProperties": false,
11
+ "description": "Self-contained activity memory describing what happened, when, where, with whom, and how it felt.",
12
+ "examples": [
13
+ {
14
+ "details": "Talked through renewal scope, confirmed timeline flexibility, and captured follow-ups.",
15
+ "memoryCategory": "work",
16
+ "memoryType": "activity",
17
+ "summary": "Client Q2 renewal meeting with Alice (ACME)",
18
+ "tags": [
19
+ "meeting",
20
+ "client",
21
+ "renewal"
22
+ ],
23
+ "title": "ACME Q2 renewal meeting",
24
+ "withActivity": {
25
+ "type": "meeting",
26
+ "associatedLocations": [
27
+ {
28
+ "address": "123 Main St, New York, NY",
29
+ "name": "ACME HQ"
30
+ }
31
+ ],
32
+ "associatedSubjects": [
33
+ {
34
+ "name": "Alice Smith",
35
+ "type": "person"
36
+ }
37
+ ],
38
+ "endsAt": "2024-05-03T15:00:00-04:00",
39
+ "feedback": "Positive momentum; Alice felt heard and open to renewal.",
40
+ "narrative": "Alice and User reviewed Q2 renewal scope, aligned on reduced deliverables, and agreed to share revised pricing next week.",
41
+ "notes": "Agenda: renewal scope, pricing, next steps.",
42
+ "startsAt": "2024-05-03T14:00:00-04:00",
43
+ "status": "completed",
44
+ "timezone": "America/New_York"
45
+ }
46
+ },
47
+ {
48
+ "details": "Routine check-up; discussed migraines and sleep habits.",
49
+ "memoryCategory": "health",
50
+ "memoryType": "activity",
51
+ "summary": "Doctor appointment with Dr. Kim about migraines",
52
+ "tags": [
53
+ "appointment",
54
+ "health"
55
+ ],
56
+ "title": "Neurology follow-up",
57
+ "withActivity": {
58
+ "type": "appointment",
59
+ "associatedLocations": [
60
+ {
61
+ "name": "City Neurology Clinic"
62
+ }
63
+ ],
64
+ "associatedSubjects": [
65
+ {
66
+ "name": "Dr. Kim",
67
+ "type": "person"
68
+ }
69
+ ],
70
+ "feedback": "Felt reassured; plan seems manageable.",
71
+ "narrative": "User saw Dr. Kim to review migraine frequency; decided to track sleep, hydration, and start a low-dose preventive.",
72
+ "notes": "Discussed triggers, hydration, and medication side effects.",
73
+ "status": "completed"
74
+ }
75
+ }
76
+ ],
77
+ "properties": {
78
+ "details": {
79
+ "description": "Optional detailed information or longer notes supporting the summary and narrative.",
80
+ "type": "string"
81
+ },
82
+ "memoryCategory": {
83
+ "description": "Memory category best matching the activity (e.g., work, health, travel, relationships).",
84
+ "type": "string"
85
+ },
86
+ "memoryType": {
87
+ "const": "activity",
88
+ "description": "Memory type; always activity.",
89
+ "type": "string"
90
+ },
91
+ "summary": {
92
+ "description": "Concise overview of this activity.",
93
+ "type": "string"
94
+ },
95
+ "tags": {
96
+ "description": "Model-generated tags summarizing key facets of the activity.",
97
+ "items": {
98
+ "type": "string"
99
+ },
100
+ "type": "array"
101
+ },
102
+ "title": {
103
+ "description": "Brief descriptive title for the activity, e.g., \"Dinner with friends at Marina\".",
104
+ "type": "string"
105
+ },
106
+ "withActivity": {
107
+ "additionalProperties": false,
108
+ "description": "Structured activity fields. Temporal and association values are optional—include only when the user mentioned them.",
109
+ "properties": {
110
+ "type": {
111
+ "description": "Activity type enum. Choose the closest match; fall back to \"other\" when unclear.",
112
+ "enum": [
113
+ "appointment",
114
+ "call",
115
+ "celebration",
116
+ "class",
117
+ "conference",
118
+ "errand",
119
+ "event",
120
+ "exercise",
121
+ "meal",
122
+ "meeting",
123
+ "other",
124
+ "project-session",
125
+ "social",
126
+ "task",
127
+ "trip",
128
+ "workshop"
129
+ ],
130
+ "type": "string"
131
+ },
132
+ "associatedLocations": {
133
+ "description": "Places linked to this activity. Capture any mentioned venue, address, or setting.",
134
+ "items": {
135
+ "additionalProperties": false,
136
+ "properties": {
137
+ "address": {
138
+ "description": "Free-form address or directions if provided.",
139
+ "type": [
140
+ "string",
141
+ "null"
142
+ ]
143
+ },
144
+ "extra": {
145
+ "description": "Optional key-value metadata related to the location.",
146
+ "type": [
147
+ "string",
148
+ "null"
149
+ ]
150
+ },
151
+ "name": {
152
+ "description": "Place name or venue label.",
153
+ "type": "string"
154
+ },
155
+ "tags": {
156
+ "description": "Place-related tags (e.g., indoor, outdoor, virtual).",
157
+ "items": {
158
+ "type": "string"
159
+ },
160
+ "type": [
161
+ "array",
162
+ "null"
163
+ ]
164
+ },
165
+ "type": {
166
+ "description": "Place type or category (office, clinic, restaurant, virtual).",
167
+ "type": "string"
168
+ }
169
+ },
170
+ "required": [
171
+ "type",
172
+ "name",
173
+ "address",
174
+ "tags",
175
+ "extra"
176
+ ],
177
+ "type": "object"
178
+ },
179
+ "type": "array"
180
+ },
181
+ "associatedObjects": {
182
+ "description": "Non-living entities or items tied to the activity (e.g., transportation for trips, devices, tools).",
183
+ "items": {
184
+ "additionalProperties": false,
185
+ "properties": {
186
+ "extra": {
187
+ "description": "Optional key-value metadata related to the object.",
188
+ "type": [
189
+ "string",
190
+ "null"
191
+ ]
192
+ },
193
+ "name": {
194
+ "description": "Name or label of the object (e.g., “MacBook”, “flight UA123”).",
195
+ "type": "string"
196
+ },
197
+ "type": {
198
+ "description": "Object category (e.g., transportation, device, document).",
199
+ "enum": [
200
+ "application",
201
+ "item",
202
+ "knowledge",
203
+ "other",
204
+ "person",
205
+ "place"
206
+ ],
207
+ "type": "string"
208
+ }
209
+ },
210
+ "required": [
211
+ "type",
212
+ "name",
213
+ "extra"
214
+ ],
215
+ "type": "object"
216
+ },
217
+ "type": "array"
218
+ },
219
+ "associatedSubjects": {
220
+ "description": "Living beings involved (people, pets, groups). Use when the subject lacks a known identity ID.",
221
+ "items": {
222
+ "additionalProperties": false,
223
+ "properties": {
224
+ "extra": {
225
+ "description": "Optional key-value metadata related to the subject.",
226
+ "type": [
227
+ "string",
228
+ "null"
229
+ ]
230
+ },
231
+ "name": {
232
+ "description": "Name or short label of the subject.",
233
+ "type": "string"
234
+ },
235
+ "type": {
236
+ "description": "Subject category (e.g., person, pet, group).",
237
+ "enum": [
238
+ "person",
239
+ "pet",
240
+ "group",
241
+ "other"
242
+ ],
243
+ "type": "string"
244
+ }
245
+ },
246
+ "required": [
247
+ "type",
248
+ "name",
249
+ "extra"
250
+ ],
251
+ "type": "object"
252
+ },
253
+ "type": "array"
254
+ },
255
+ "endsAt": {
256
+ "description": "ISO 8601 end time for the activity when specified. Omit if not explicitly provided.",
257
+ "format": "date-time",
258
+ "type": [
259
+ "string",
260
+ "null"
261
+ ]
262
+ },
263
+ "feedback": {
264
+ "description": "Subjective feelings or evaluation of how the activity went (mood, satisfaction, effort).",
265
+ "type": [
266
+ "string",
267
+ "null"
268
+ ]
269
+ },
270
+ "metadata": {
271
+ "additionalProperties": false,
272
+ "description": "Additional structured metadata to keep raw hints (JSON object). Use sparingly.",
273
+ "type": [
274
+ "object",
275
+ "null"
276
+ ]
277
+ },
278
+ "narrative": {
279
+ "description": "Factual story of what happened (chronology, participants, outcomes). Required for recall.",
280
+ "type": "string"
281
+ },
282
+ "notes": {
283
+ "description": "Short annotations such as agenda, preparation, or quick bullets distinct from narrative.",
284
+ "type": [
285
+ "string",
286
+ "null"
287
+ ]
288
+ },
289
+ "startsAt": {
290
+ "description": "ISO 8601 start time for the activity when specified. Omit if not explicitly provided.",
291
+ "format": "date-time",
292
+ "type": [
293
+ "string",
294
+ "null"
295
+ ]
296
+ },
297
+ "status": {
298
+ "description": "Lifecycle status when mentioned. Use planned/completed/cancelled/ongoing/on_hold/pending. Omit if unclear.",
299
+ "enum": [
300
+ "planned",
301
+ "completed",
302
+ "cancelled",
303
+ "ongoing",
304
+ "on_hold",
305
+ "pending"
306
+ ],
307
+ "type": [
308
+ "string",
309
+ "null"
310
+ ]
311
+ },
312
+ "tags": {
313
+ "description": "Optional activity-specific tags or facets.",
314
+ "items": {
315
+ "type": "string"
316
+ },
317
+ "type": [
318
+ "array",
319
+ "null"
320
+ ]
321
+ },
322
+ "timezone": {
323
+ "description": "IANA timezone string for the start/end times when provided (e.g., \"America/New_York\").",
324
+ "type": [
325
+ "string",
326
+ "null"
327
+ ]
328
+ }
329
+ },
330
+ "required": [
331
+ "type",
332
+ "narrative",
333
+ "feedback",
334
+ "notes",
335
+ "associatedLocations",
336
+ "associatedSubjects",
337
+ "associatedObjects",
338
+ "startsAt",
339
+ "endsAt",
340
+ "status",
341
+ "tags",
342
+ "timezone",
343
+ "metadata"
344
+ ],
345
+ "type": "object"
346
+ }
347
+ },
348
+ "required": [
349
+ "title",
350
+ "summary",
351
+ "details",
352
+ "memoryType",
353
+ "memoryCategory",
354
+ "tags",
355
+ "withActivity"
356
+ ],
357
+ "type": "object"
358
+ },
359
+ "type": "array"
360
+ }
361
+ },
362
+ "required": [
363
+ "memories"
364
+ ],
365
+ "type": "object"
366
+ },
367
+ "strict": true
368
+ },
369
+ "type": "json_schema"
370
+ }
@@ -62,6 +62,12 @@
62
62
  "type": "string",
63
63
  "description": "Narrative describing key insights or lessons learned"
64
64
  },
65
+ "knowledgeValueScore": {
66
+ "type": "number",
67
+ "minimum": 0,
68
+ "maximum": 1,
69
+ "description": "Numeric score (0-1) describing how reusable and shareable this experience is"
70
+ },
65
71
  "labels": {
66
72
  "type": "array",
67
73
  "items": {
@@ -73,6 +79,12 @@
73
79
  "type": "string",
74
80
  "description": "Narrative describing potential outcomes or learnings"
75
81
  },
82
+ "problemSolvingScore": {
83
+ "type": "number",
84
+ "minimum": 0,
85
+ "maximum": 1,
86
+ "description": "Numeric score (0-1) describing how effectively the problem was solved"
87
+ },
76
88
  "reasoning": {
77
89
  "type": "string",
78
90
  "description": "Narrative describing the thought process or motivations"
@@ -95,8 +107,10 @@
95
107
  "required": [
96
108
  "action",
97
109
  "keyLearning",
110
+ "knowledgeValueScore",
98
111
  "labels",
99
112
  "possibleOutcome",
113
+ "problemSolvingScore",
100
114
  "reasoning",
101
115
  "scoreConfidence",
102
116
  "situation",